在LLBL Genpro中写入包含的表达式

时间:2018-09-18 10:36:16

标签: c# lambda llblgenpro

我该如何使用LLBL GenPro编写一些代码:

var myString = "Blah,Blah,Blah,Blah";
DbContext.MyTableName.Where(a => myString.Contains(a.TableFiledName.ToString()))

它是带有实体的lambda表达式,但是现在我想在LLBL Genpro中做同样的事情,我该怎么做?

请帮助 谢谢

1 个答案:

答案 0 :(得分:0)

假设您所指的是LLBLGen Framework(LLBLGen设计器supports generating code for multiple O/RM Framerowks),这就是using QuerySpec的样子:

var myString = "Blah,Blah,Blah,Blah";

var qf = new QueryFactory();
var q = qf.Customer.Where(CustomerFields.Country.Contains(myString));

或者非常相似,使用Linq2LLBL

var myString = "Blah,Blah,Blah,Blah";

var metaData = new LinqMetaData(adapter);
var q = from c in metaData.Customer where c.Country.Contains(myString);