GetTableName() for InMemory provider isn't working as expected
Closed this issue · 1 comments
antifree commented
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
ajcvickers commented