Thanks Fabio, that does the Job. On Thu, Sep 17, 2009 at 5:52 PM, Fabio Maulo <[email protected]> wrote:
> > http://fabiomaulo.blogspot.com/2009/08/from-db-to-ram-wellknowinstancetype.html > > 2009/9/17 Shadi Marei <[email protected]> > > Any idea how to map this class in nhibernate using the value as a field in >> the database >> >> public class UserVisibleTo : Enumeration >> { >> protected UserVisibleTo() : base() { } >> >> public UserVisibleTo(int value, string displayName) : base >> (value, displayName) { } >> >> public static readonly UserVisibleTo School = new UserVisibleTo >> (0, "School"); >> public static readonly UserVisibleTo Classroom = new >> UserVisibleTo(1, "Classroom"); >> public static readonly UserVisibleTo RoomParents = new >> UserVisibleTo(2, "Room Parents"); >> public static readonly UserVisibleTo HeadRoomParent = new >> UserVisibleTo(3, "Head Room Parent"); >> public static readonly UserVisibleTo Private = new >> UserVisibleTo(4, "Private"); >> } >> >> >> >> > > > -- > Fabio Maulo > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
