LINQ Select specific columns RRS feed

  • Question

  • Hello, I am new to LINQ.  I have a question.  I have a SQL table with columns named A_1, B_1, C_1, A_2, B_2, C_2, A_3, B_3, C_3.  I would like to write a linq query in C# to get data out of the specific columns based on parameter (in this case it is "1", "2" or "3").  For example, if input parameter is 1, it will get data from A_1, B_1, C_1; if input parameter is 3, it will get data from A_3, B_3, C_3.  How can I do it? 
    Thanks a lot.

    Tuesday, June 9, 2009 4:42 PM


All replies