Select a Column Dynamically using LINQ?

Posted by vsj on Stack Overflow See other posts from Stack Overflow or by vsj
Published on 2010-04-26T21:29:25Z Indexed on 2010/04/26 21:33 UTC
Read the original article Hit count: 204

Filed under:
|

Hi all I am trying to do a very simple dynamic query which will select a column dynamically I mean the selection of column would depend upon another query so I would select x col if cond1 and y if cond2 so I tried using query.Select(colname) using the extension method also tried using Func<> but I am not sure how to go about this I have read about dynamic extension for linq and also reflection but woth reflection to the GetValue function does not return value for my column in database. please help me out I am jus trying to select a column dynamically at runtime and no condtions really on it.

© Stack Overflow or respective owner

Related posts about LINQ

Related posts about dynamic