如何在Vb.net中创建动态Linq to SQL

问题描述:

我有内联和动态SQL查询,例如



I have inline and dynamic SQL query like

Dim SQL as string ="sSelect" & Top & "i1.f1,i2.f2" & sselect & 
"from table1 i1 inner join table i2 on i1.eventseriesID=i2.eventseriesID " & Sjoin &
& " where i1.binheritseries=1 "

if where <>"" then
SQL &="order By" & OrderBy
End if



在这个Top,sjoin中,Sjoin是额外选择的字段,字段和其他连续的Join。

现在我希望这个查询作为LINQ使用dbml文件与正确的表关联和字符串表达式linq.I试图获得帮助来自以上链接

http ://*.com/questions/13995212/technique-for-dynamically-adding-a-join-to-a-linq-query [ ^ ]

但是我不能成功。请告诉我任何人非常紧急


In this Top,sselect,Sjoin are extra selected fields ,fields and additional Join sequentially.
Now i want this query as LINQ using dbml file with correct table association and string expression linq.I tried to get help from above link
http://*.com/questions/13995212/technique-for-dynamically-adding-a-join-to-a-linq-query[^]
But i couldnt succeed.Please tell me anybody Its very urgent

看看类似的问题: Hotw创建Dyn amic Linque设置 [ ^ ]
Have a look at similar question: Hotw to create Dynamic Linque To set[^]