1

i want to simply get an lambda expression from given column names for example

input = "Field1,Field2"

output of type lambda expression for select statement:

x=> new { Field1 = x.Field1, Field2 = x.Field2 }

I do not want to use any class e.g. x=> new ClassName { Field1= x.Field1, Field2= x.Field2}

without Roslyn scripting

Camilo Terevinto
  • 31,141
  • 6
  • 88
  • 120
  • https://stackoverflow.com/questions/3740532/how-to-use-expression-to-build-an-anonymous-type all answers in this question are specifying the members type e.g. string for name and int for number – Muhammad Fahad Aug 26 '18 at 17:16

0 Answers0