开发者

Dynamically sorting a DbDataReader using LINQ

开发者 https://www.devze.com 2022-12-10 23:07 出处:网络
I am very new to LINQ and have a class method, which when called, returns a DbDataReader object. How would I sort开发者_开发问答 this dynamically using a LINQ query expression where the sort expressio

I am very new to LINQ and have a class method, which when called, returns a DbDataReader object. How would I sort开发者_开发问答 this dynamically using a LINQ query expression where the sort expression is provided as a string (e.g. "LastName DESC")


Can't take any credit - links in this question to Dynamic Linq and how to do it without:

Dynamic LINQ OrderBy on IEnumerable<T>

0

精彩评论

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