我正在与旧数据库,并尝试创建与某些表的地图。 Theres profile for user,profile has reference to contact channel。但是,在用户的数据库密钥中是复合密钥。这有些不错,但是在数据库中有一些神奇的字符串,如果它们可以转换为更多类型的版本,那应该是很好的。 在剖面图: CompositeId()
.KeyProperty(x => x
我使用实体框架5代码优先,并且存在组合键的一些问题。 我有这些表 这是怎么我的实体 public class Product : EntityBase
{
public Product()
{
this.ProductArticles = new List<ProductArticle>();
}
[Key, Column(
我想映射一个实体的组合键。 public class Customer
{
public int CustomerId { get; set; }
public virtual List<CustomerImage> CustomerImages { get; set; }
}
而且其地图: public class CustomerMap : EntityTypeCo