I am relatively new to LINQ and don’t know how to do an Order By. I have an IEnumerable list of myObject and want to do something like select first myObject from myObjectList order by myObject.id asc How can I accomplish this? Thanks
I am relatively new to LINQ and don’t know how to do an Order
Share
Ascending is the default order by direction.
If you want descending, you will want to use
orderby myObject.id descending.