C# EF Model 中关于定义复合主键的问题
EF model 定义复合主键
根据唯一性原则,对于多主键的字段采取【Column(Order = 0)】、【Column(Order = 1)】、【Column(Order = 2)】... ...
public class Table
{
[Key] [Column(Order = 0)] public string Code { get; set; }
[Key] [Column(Order = 1)] public string Name { get; set; }
}