Setting schema name for DbContext
You can configure the default schema in OnModelCreating method of your custom inherited DbContext class like – public class MyContext: DbContext { public MyContext(): base(“MyContext”) { } public DbSet<Student> Students { get; set; } protected override void OnModelCreating(DbModelBuilder modelBuilder) { //Configure default schema modelBuilder.HasDefaultSchema(“Ordering”); } } Starting with EF6 you can use the HasDefaultSchema method … Read more