I'm using EF 6, have two simple POCO class as below:
public class Person
{
public int PersonId { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
}
public class Company
{
public int CompanyId { get; set; }
public string Name { get; set; }
}
and my context
public class Context : DbContext
{
public Context() : base("name=codefirst")
{
}
public DbSet<Person> People { get; set; }
public DbSet<Company> Corporation { get; set; }
}
And EF generated tables : dbo.Companies and dbo.People
My question is why one table name is People and other table name is Companies (I know why is pluralized). I mean, One table use the property name, and the other table use the class name ?
Thanks in advance!
Person
isPeople