0
我用具有表存儲多達5類用戶有權限查看舊的數據庫工作列:映射的IList項目
USER_ELIGIBILITY
----------------
Eligibility_Id INT PRIMARY KEY
Eligibility_Name NVARCHAR(100)
CategoryId1 INT
CategoryId2 INT
CategoryId3 INT
CategoryId4 INT
CategoryId5 INT
下面是如何我已經創建的類:
public Eligibility : Entity
{
public virtual int Id { get; set; }
public virtual string Name { get; set; }
public virtual IList<Category> AllowedCategories { get; set; }
}
這是建模的正確方法嗎?如果是這樣,我該如何映射它?
另請參閱:http://ayende.com/Blog/archive/2009/04/11/nhibernate-mapping-ltdynamic-componentgt.aspx – 2010-07-04 13:15:57