我有一个这样的课程:
public class SwissPhoneNumberPartsRecordings : Entity
{
public virtual IDictionary<string, Recording> AreaCode { get; set; }
public virtual IDictionary<string, Recording> FirstPart { get; set; }
public virtual IDictionary<string, Recording> SecondPart { get; set; }
public virtual IDictionary<string, Recording> ThirdPart { get; set; }
}
我想将其映射到下表
表SwissPhoneNumberPartsRecordings
的列:
ID
(PK)AreaCodeID
- &gt;表IndexedRecordings
FirstPart
- &gt;表IndexedRecordings
SecondPart
- &GT;表IndexedRecordings
ThirdPart
- &gt;表IndexedRecordings
表IndexedRecordings
的列:
ID
(PK)RecordingID
- &gt;表Recordings
Index
- &gt; Key
SwissPhoneNumberPartsRecordings
如何使用Fluent NHibernate进行映射?我也愿意在必要时引入某种新的实体IndexedRecordings