开发者

nHibernate persist IList<DayOfWeek>

开发者 https://www.devze.com 2022-12-25 07:06 出处:网络
Is it possibl开发者_高级运维e to persist an IList<DayOfWeek> using nHibernate? public class Vendor

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)

0

精彩评论

暂无评论...
验证码 换一张
取 消