How to fluent-map this (using fluent nhibernate)?

Posted by vikasde on Stack Overflow See other posts from Stack Overflow or by vikasde
Published on 2009-11-06T14:55:30Z Indexed on 2011/03/15 0:09 UTC
Read the original article Hit count: 360

I have two tables in my database "Styles" and "BannedStyles". They have a reference via the ItemNo. Now styles can be banned per store. So if style x is banned at store Y then its very possible that its not banned at store Z or vice verse. What is the best way now to map this to a single entity? Should I be mapping this to a single entity?

My Style entity looks like this:

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

© Stack Overflow or respective owner

Related posts about nhibernate

Related posts about fluent-nhibernate