笔记:示例
_list = session.QueryOver<JxReg>()
.Where(x => x.DrugType == 1).And(Expression.Like("RegID", RegID.Text, MatchMode.Anywhere)).JoinAlias(x => x._Patient, () => _patient)
.WhereRestrictionOn(() => _patient.PatientName).IsLike(PatientName.Text, MatchMode.Anywhere)
.JoinAlias(x => x._Usercase, () => _usercase)
.AndRestrictionOn(x => x.CreateTime).
IsBetween(CreateTime.Value.ToString("yyyy-MM-dd") + " 00:00:00")
.And(CreateTime.Value.ToString("yyyy-MM-dd") + " 23:59:59")
.List();