日期:2014-05-17 浏览次数:20450 次
逐个判断条件内容,有就拼接到sql或者用参数形式,有就为参数赋值
OQLCompare cmp=new OQLCompare(entity1); OQLCompare cmpresult=cmp.Compare(entity1.Field1,">=","aaa") & cmp.Compare(entity1.Field2,"=",123) & ....无限组合下去 var list=EntityQuery<Model1>.QueryList(OQL.From(entity).Select().Where(cmpresult).End);