NHibernate 中Not的使用方法
public virtual EmployeeJoinInfo GetEmployeeJoinByWorkCode(string workCode) { using(ISession session = OpenSession()) { IList list = session.CreateCriteria(typeof(EmployeeJoinInfo)).Add(Expression.Eq("WorkCode", workCode)).Add(Expression.Not(Expression.Eq("ExecStatus",ExecuteStatus.Executed))).List(); if(list.Count>0) { return (EmployeeJoinInfo)list[0]; } } return null; }