You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we use the InMemory provider, GetTableName() returns EntityType Name as the default table name instead of DbSet property name. So we need to use modelbuilder.ToTable() to configure table names, as we expect.
By the way, data annotation attribute Table doesn't work either for InMemory provider. Possibly, it would be better to create a separate issue for this.
Other providers use DbSet property name as the default value so such behavior of InMemory provider is confusing.
Further technical details
EF Core version: 3.1.1
Database provider: Microsoft.EntityFrameworkCore.InMemory
Target framework: .NET Core 3.1 or .NET Standard 2.1
Operating system: Windows 10
IDE: Visual Studio 2019 16.3
The text was updated successfully, but these errors were encountered:
When we use the InMemory provider,
GetTableName()
returns EntityType Name as the default table name instead of DbSet property name. So we need to usemodelbuilder.ToTable()
to configure table names, as we expect.Other providers use DbSet property name as the default value so such behavior of InMemory provider is confusing.
Further technical details
EF Core version: 3.1.1
Database provider: Microsoft.EntityFrameworkCore.InMemory
Target framework: .NET Core 3.1 or .NET Standard 2.1
Operating system: Windows 10
IDE: Visual Studio 2019 16.3
The text was updated successfully, but these errors were encountered: