は、私は、このような契約、メディアとしての2つのエンティティを、持っている、場合である。Entity Frameworkで多対多マッピングを作成する方法は?ここで
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..*
}
契約は、多くのメディアシュを持っている、彼らが多くの多くあるようです。
ただし、 efコードでは、ContractMediaテーブルに3つ以上のフィールドが必要です(自動生成されます)。 StartDate、EndDate、Priceなどの これらはMediaエンティティに追加できませんでした。
この場合のマップ方法は?
可能重複http://stackoverflow.com/questions/7050404/create-code-first-many-to-many-([関連テーブルの追加フィールドで、多くに多く、最初のコードの作成] with-additional-fields-in-association-table) – forsvarir