예제 #1
0
 public virtual IEnumerable <Type> GetContextTypes() =>
 ContextTool.GetContextTypes(_assembly)
 .Concat(
     MigrationAssembly.GetMigrationTypes(_assembly)
     .Select(MigrationAssembly.TryGetContextType)
     .Where(t => t != null))
 .Distinct();
예제 #2
0
 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));
 }