The entity type is not part of the model for the current context

Put this in your custom DbContext class: protected override void OnModelCreating(DbModelBuilder modelBuilder) { modelBuilder.Entity<Estate>().ToTable(“Estate”); } If your tables are not created on startup, this is why. You need to tell the DbContext about them in the OnModelCreating method override. You can either do custom per-entity mappings here, or separate them out into separate EntityTypeConfiguration<T> classes.

Entity Framework: One Database, Multiple DbContexts. Is this a bad idea? [closed]

You can have multiple contexts for single database. It can be useful for example if your database contains multiple database schemas and you want to handle each of them as separate self contained area. The problem is when you want to use code first to create your database – only single context in your application … Read more