How to make the position of a LINQ Query SELECT variable

前端 未结 2 603
一向
一向 2021-01-26 04:45

Is it possible to make the LINQ SELECT more flexible by not working with properties but with the column name? Maybe an example will help..I\'m trying to do the following (pseudo

2条回答
  •  星月不相逢
    2021-01-26 05:50

    Maybe this will help you

    from x In Entities
    where ... select new {
      Value = x["Value"],
      Date = x["Date"],
      ID = x["ID"]
    }
    

提交回复
热议问题