I'd like select different column based on some variable
instead of doing something like this
if(selectLastName)
var res = from e in ctx.Employees
select new {e.FirstName, e.LastName};
else
var res = from e in ctx.Employees
select new {e.FirstName}
How can I re-write this ?