在這種情況下,我有2個(gè)實(shí)體,例如Contract,Media。public class Media : Entity{ public string Name {get; set;} public bool Enabled *//other properties can be ignored..*}public class Contract : Entity{ public string Code {get; set;} *//other properties can be ignored..*}合同有許多媒體,看來它們是多對(duì)多的。但!!首先在EF代碼,我需要在ContractMedia表(EF自動(dòng)生成)中再添加3個(gè)字段。例如StartDate,EndDate和Price。無法將其添加到媒體實(shí)體中。在這種情況下如何映射?
- 3 回答
- 0 關(guān)注
- 313 瀏覽
添加回答
舉報(bào)
0/150
提交
取消