首页 > 技术文章 > EntityFramework中Mapper怎么定义联合主键?
sggx 2015-07-07 10:56 原文
HasKey(m => new { m.StoreId, m.CarTypeId, m.CarLevel})
用“new {}”联合主键以“,”分隔形式定义