Entity Framewor 学习笔记 (SQL Server 命名规范)
public class Person { [Key] public int id { get; set; } public Ta ta1 { get; set; } public Ta ta2 { get; set; } } [ComplexType] public class Ta { public string token { get; set; } }
table name 就是 ClassName 的多量字 ,比如 : Person = People , Category = Categories , Product = Products
ComplexType 就是 ClassName第一个字变小写 + "_" + propetyName , 比如 Ta.token = ta_token , Address.postcode = address_postcode
如果有层级它会连着下去 Ta.xx.token = ta_xx_token