We're using the RC1 release of ASP.NET 5 with the new Entity Framework 7 and I'd like to have table names in the database to be prefixed with the name of the namespace in which the model lives.
I know how to do this with in the previous version of Entity Framework (thanks to this SO question) but I can't figure out how to do the same in the new version. I went through the docs, Googled it and poked my head in the source code, to no avail.
What I do in EF6:
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Types().Configure(entity => entity.ToTable($"{entity.ClrType.Namespace?.Replace('.', '-')}_{entity.ClrType.Name}s"));
base.OnModelCreating(modelBuilder);
}
How can I do the same with EF7? Is this one of the things that aren't in there yet maybe?