efcore / EFCore.NamingConventions

Entity Framework Core plugin to apply naming conventions to table and column names (e.g. snake_case)
Apache License 2.0
715 stars 73 forks source link

Misleading docs on default table naming behavior #283

Closed hakimdotdev closed 2 months ago

hakimdotdev commented 3 months ago

The README states:

EF Core will map to tables and columns named exactly after your .NET classes and properties

As seen in the example below that statement, EF Core pluralizes the table name to "Customers" rather than using the exact name "Customer". This should be clearly documented to avoid confusion.

E.g.:

By default, EF Core will map to tables named after your .NET classes with pluralization and columns named exactly after your .NET properties

ajcvickers commented 3 months ago

@hakimdotdev EF Core does not pluralize Customer to Customers. However, if you create a DbSet property for Customer on your DbContext, then EF Core will use the name of that property as your table name.