【问题标题】:How to fluent-map this (using fluent nhibernate)?如何流利地映射这个(使用流利的nhibernate)?
【发布时间】:2009-11-06 14:55:30
【问题描述】:

我的数据库“Styles”和“BannedStyles”中有两个表。他们通过 ItemNo 引用。现在每个商店都可以禁止样式。因此,如果样式 x 在 Y 商店被禁止,那么它很可能在 Z 商店没有被禁止,反之亦然。现在将其映射到单个实体的最佳方法是什么?我应该将其映射到单个实体吗?

我的 Style 实体如下所示:

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; }
}

【问题讨论】:

    标签: nhibernate fluent-nhibernate domain-driven-design entity


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 2010-12-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-09
      • 2010-12-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多