public virtual IEnumerable <Type> GetContextTypes() => ContextTool.GetContextTypes(_assembly) .Concat( MigrationAssembly.GetMigrationTypes(_assembly) .Select(MigrationAssembly.TryGetContextType) .Where(t => t != null)) .Distinct();
public virtual IEnumerable <Type> GetContextTypes() => ContextTool.GetContextTypes(_assembly) .Concat( _assembly.GetConstructibleTypes() .Where(t => typeof(Migration).IsAssignableFrom(t.AsType())) .Select(t => t.GetCustomAttribute <DbContextAttribute>()?.ContextType) .Where(t => t != null)) .Distinct();
// TODO: Find from migration types instead (See #628) public virtual IEnumerable <Type> GetContextTypes() { return(ContextTool.GetContextTypes(_assembly)); }