If I specify ToTable
in the OnModelCreating
override like so:
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Team>()
.MapSingleType()
.ToTable("my_teams");
}
it creates dbo.my_teams
, however if I separate it out into classes like so:
public class TeamMap : EntityConfiguration<Team>
{
public TeamMap()
{
MapSingleType()
.ToTable("my_teams");
}
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Configurations.Add(new TeamMap());
}
it creates dbo.Teams
. Any ideas why?