Unfortunately I have found myself doing a full ground up rebuild with my code as the solution was taking 5 minutes to build. I decided to take the opportunity to move to dotnet core 3.1.
However, I have found that the option .SetTableName
is not available as part of "entity".
I am using it as part of setting shadow properties in the DbContext. Here is my code.
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
foreach (var entity in modelBuilder.Model.GetEntityTypes())
{
//entity.Relational().TableName = entity.DisplayName(); // Dotnet Core 2...
entity.SetTableName(entity.DisplayName()); //HERE
}
modelBuilder.ShadowProperties(); // Adding in the shadow properties here..
...
Is there another way to set the table name in this scenario and if not are there other options?