表属性

[Table("People")]
public class Person
{
    public int PersonID { get; set; }
    public string PersonName { get; set; }    
}

告诉实体框架使用特定的表名而不是生成一个(即 Person 或 Persons)

我们还可以使用[Table]属性为表指定模式

[Table("People", Schema = "domain")]