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 th开发者_运维技巧at 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; }
}
http://github.com/jagregory/fluent-nhibernate/tree/master/src/Examples.FirstProject/ might help you.
Magesh
精彩评论