I have 2 entities:
//Product (all properties is the composite key)
public string Id {get; set;}
public string CompanyName {get; set;}
//ProductDescriptions (All properties is the composite key)
public string ProductId {get; set;}
public string CompanyName {get; set;}
public string Language {get; set;}
so all the properties in each of the entites makes the composite key. What i want to do is to use code first fluent api to mapp product to productdescriptions using navigation properties. I have tried a lot of different ways using WithMany, WithOptionl, HasMany, HasOptional functions to mapp either product to productdescription or the other way around. Product can have many productdescriptions and each productdescription needs to have one product.
I also read somewhere that you need to have all properties from the composite key in the other entity to map it using code first. So in this case i can't have a navigation property in product with productdescriptions since the product entity doesn't contain the Language Property.
But is it then possible to map it the other way? Since productdescription has all the properties from the composite key of product.