如何使用Nhibernate设置枚举列?
使用nhibernate,如何将列设置为枚举类型 e、 g 用户类具有UserType,它是一个枚举如何使用Nhibernate设置枚举列?,nhibernate,Nhibernate,使用nhibernate,如何将列设置为枚举类型 e、 g 用户类具有UserType,它是一个枚举 public enum UserType { Normal = 1, Super = 2 } 您不需要为枚举构建映射。将枚举添加到对象上的映射。将该类型声明为枚举的类型。db中的列需要是int,NHib将正确映射它 在我的回答中
public enum UserType { Normal = 1, Super = 2 }
您不需要为枚举构建映射。将枚举添加到对象上的映射。将该类型声明为枚举的类型。db中的列需要是int,NHib将正确映射它 在我的回答中