我有这个示例代码......
Result = session.QueryOver<Lfee_Exc>().WhereRestrictionOn(x => x.FirstName)
.IsIn(ListOfFirstNames).List();
对于我的区分大小写的Oracle服务器,有没有办法让这个大小写不敏感或大写x.ArNumber?
答案 0 :(得分:10)
将ListOfFirstNames转换为大写,然后:
session.QueryOver<Lfee_Exc>()
.Where(Restrictions.In(Projections.SqlFunction(
"upper", NHibernateUtil.String,
Projections.Property<Lfee_Exc>(x => x.FirstName)),
ListOfFirstNames))