开发者

boolean in criteria query

开发者 https://www.devze.com 2022-12-15 05:30 出处:网络
My criteria looks like: 开发者_高级运维Session.CreateCriteria(typeof(User)) .Add(Expression.Eq(\"IsActive\", 1);

My criteria looks like:

开发者_高级运维
Session.CreateCriteria(typeof(User))
  .Add(Expression.Eq("IsActive", 1);

Do I put 1 or True for the IsActive boolean check? (non seem to work?)

what are my options?


How is your DB defined?

I use this code: customer.Add(new EqExpression("Deleted", false)); To access a field in my database where the "Deleted" field is defined as a bit that does not allow null. (This is a SQL 2005 DB)

0

精彩评论

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