找了半天,才找到:
IQueryOver<User> queryOver = _session.QueryOver<User>()
.Where(
Restrictions.Or(
Restrictions.Where<User>(u=>u.RealName.IsLike(“%B%”)),
Restrictions.Where<User>(u=>u.UserName.IsLike(“%A%”))
)
).OrderBy(m => m.UpdateTime).Desc;
找了半天,才找到:
IQueryOver<User> queryOver = _session.QueryOver<User>()
.Where(
Restrictions.Or(
Restrictions.Where<User>(u=>u.RealName.IsLike(“%B%”)),
Restrictions.Where<User>(u=>u.UserName.IsLike(“%A%”))
)
).OrderBy(m => m.UpdateTime).Desc;