I'm using EF Power Tools to Reverse Engineering from a DB.
while in the context it properly writes
//TABLE NAME: USERS
public DbSet<Users> Users { get; set; }
in the entity class it writes
public partial class User
Where the system is changing the name of the table from 'Users' (correct) to 'User' (not correct)?
Please note that i modified the Context.tt
<#
foreach (var set in efHost.EntityContainer.BaseEntitySets.OfType<EntitySet>())
{
#>
public DbSet<<#= set.Name #>> <#= set.Name #> { get; set; }
<#
}
#>
because in my context i want to have
public DbSet<TABLE_NAME> TABLE_NAME { get; set; }
It should be after the line (or not far)
in
Entity.tt
You should find a line
public class <#= efHost.EntityType.Name #>
which you'll have to change.By the way, I think it's a bad idea, as this way of naming is a kind of convention for EF :
DbSet
is pluralized,class
is in the singular.