c# - How to use descending with ascending in linq? -
i have query
select * fellow member order d_no.member desc, datebirth asc i thinking how can in linq? have list<member>
i used this
var result = member.orderbydescending(s => s.d_no).orderby(y => y.datebirth ).tolist(); is not working, idea?
orderbydescending returns instance of type iorderedenumerable<tsource>. can phone call thenby or thenbydescending apply sec (or third) ordering constraint.
var result = member.orderbydescending(s => s.d_no) .thenby(y => y.datebirth ) .tolist(); c# linq
No comments:
Post a Comment