开发者

boolean in criteria query

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜