nHibernate persist IList<DayOfWeek>
Is it possibl开发者_高级运维e to persist an IList<DayOfWeek>
using nHibernate?
public class Vendor
{
public virtual IList<DayOfWeek> OrderDays { get; private set; }
}
If not, what are some common solutions; creating a class for OrderDays?, using an IList<string>
?
Of course it's possible...
<bag name="OrderDays">
<key column="VendorId" />
<element type="System.DayOfWeek" />
</bag>
VendorId
would be the FK column to Vendor
in the OrderDays
table (you can customize all of that)
精彩评论