0
我有一个从数据表中选择一些行的查询,但该条款where
级联根据许多测试,波纹管我什么都试过,但他没有工作:动态where子句中的LINQ到数据表
Dim queryArchi = (From b In DataBien.AsEnumerable()
Group b By b!nom_ville, b!Designation_projet, b!code_ville, b!code_projet Into Group
Select nom_ville, Designation_projet,code_ville, code_projet, NBP = Group.Count())
If vil <> "" Then queryArchi = queryArchi.Where(Function(d) d.code_ville = vil)
If p > 0 Then queryArchi.Where(Function(d) d.code_projet.Equals(p))
queryStructure = queryArchi.ToList
只有第一个测试工作:
If vil <> "" Then queryArchi = queryArchi.Where(Function(d) d.code_ville = vil)
我不知道是否有一个auther可能性来完成我寻找。 感谢我提前