I have IQueryable<>
object.
I want to Convert it into List<>
with selected columns like new { ID = s.ID, Name = s.Name }
.
Edited
Marc you are absolutely right!
but I have only access to FindByAll()
Method (because of my architecture).
And it gives me whole object in IQueryable<>
And I have strict requirement( for creating json object for select tag) to have only list<>
type with two fields.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…