Migrations adds the letter S to the table name

1

I have a model:

public class pimentel
{
    [Key]
    public int id { get; set; }
    public string cod_item_Crm { get; set; }
    public string tag { get; set; }
    public string data_anal { get; set; }
    public string modelo { get; set; }
    public int cod_cli { get; set; }
}

However, when I run the application, the system always looks for the name table pimentels , and if it does not exist, it creates a table, but always with the letter "S" at the end.

I can change from model to any other, and always it generates with the letter "S" at the end

Do you have any idea what it can be?

    
asked by anonymous 24.07.2017 / 19:12

1 answer

2

This is the default rule for class name pluralization.

You can disable this in the OnModelCreating method, with the following code

modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
    
24.07.2017 / 19:32