How to pluralize collections when performing scaffold dbcontext?

asp.net-core entity-framework-core scaffolding

Question

I performed a scaffold dbcontext and everything is fine exception the collections aren't pluralized. Is there an argument I can add to the command to fix this?

This is the command I ran:

dotnet ef dbcontext scaffold "my connection string" 
Microsoft.EntityFrameworkCore.SqlServer -o Entities -c DbEntities

What I want:

public partial class Client
{
    public int Id { get; set; }
    public ICollection<Order> Orders { get; set; }
}

What I'm getting:

public partial class Client
{
    public int Id { get; set; }
    public ICollection<Order> Order { get; set; }
}
1
2
1/11/2019 5:56:03 PM

Popular Answer

0
1/11/2019 7:43:11 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow