In previous versions of EF, you could configure all of your entity maps on the DbContext like this :-
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Configurations.AddFromAssembly(typeof(MyDbContext).Assembly);
base.OnModelCreating(modelBuilder);
}
However in the latest EF Core it seems you have to add each mapping individually like this :-
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.ApplyConfiguration(new UserMap());
modelBuilder.ApplyConfiguration(new AddressMap());
base.OnModelCreating(modelBuilder);
}
Is there no similar way of add Entity Maps, as this is tedious.