Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetTableName() for InMemory provider isn't working as expected #19751

Closed
antifree opened this issue Jan 30, 2020 · 1 comment
Closed

GetTableName() for InMemory provider isn't working as expected #19751

antifree opened this issue Jan 30, 2020 · 1 comment

Comments

@antifree
Copy link

antifree commented Jan 30, 2020

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
Copy link
Contributor

Duplicate of #15015
See also #18457

@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants