开发者

Retrieve rows, return only user selected columns from the list

开发者 https://www.devze.com 2023-03-24 18:08 出处:网络
I need to retrieve columns which will be decided by user at run-time. Lets assume EmpTable > EmpID, EmpName, EmpDesignation

I need to retrieve columns which will be decided by user at run-time. Lets assume EmpTable > EmpID, EmpName, EmpDesignation

All column will be listed in list. And then User will be select the col开发者_开发问答umn which he wanna to be export.

Can we achieve using Linq? Any help would be greatly appreciated.


String myQuery = "select "; 

// build your query with selected items
var result = datacontext.ExecuteQuery(myQuery);
0

精彩评论

暂无评论...
验证码 换一张
取 消