2009-11-06 113 views
0

我有两个表在我的数据库“样式”和“BannedStyles”。他们通过ItemNo有一个参考。现在每个商店都可以禁止样式。所以如果x店在Y店被禁止,那么很可能它不会在店Z或反之前禁止。将此映射到单个实体的最佳方式是什么?我应该将其映射到单个实体吗?如何流利地图(使用流利的nhibernate)?

我的风格实体看起来是这样的:

public class Style 
{ 
     public virtual int ItemNo { get; set;} 
     public virtual string SKU { get; set; } 
     public virtual string StyleName { get; set; } 
     public virtual string Description { get; set; } 
     public virtual Store Store { get; set; } 
     public virtual bool IsEntireStyleBanned { get; set; } 
} 

回答