dotnet / efcore

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
https://docs.microsoft.com/ef/
MIT License
13.66k stars 3.16k forks source link

Pluralization Support - EFCore 1.1 #7140

Closed ghost closed 1 year ago

ghost commented 7 years ago

Hi,

I know there are a bunch of threads about this issue but I can't find an official answer OR better a solution. I'm using the latest version of EF + associated Tools. However I can't pluralize DBSets name (not important) or properties name (=relationship).

Is there a way to pluralize (at least) relationship name (all properties of type ICollection<...>)!

Command Line: Scaffold-DbContext -Connection "Server=localhost;Database=TecCore;Trusted_Connection=true;" -Provider Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models

public partial class Entitlement
{
    public Entitlement()
    {
        EntitlementUsage = new HashSet<EntitlementUsage>();
    }
    public virtual ICollection<EntitlementUsage> EntitlementUsage { get; set; }
}

Thx Seb

rowanmiller commented 7 years ago

This isn't currently implemented, but it is tracked by https://github.com/aspnet/EntityFramework/issues/3060. We were trying to fit it into the 1.1 release, but it did not make it.