The entity type is not part of the model for the current context
Put this in your custom DbContext class: 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.