Can someone help by showing me how to sort a LINQ expression.
I have the following:
.OrderByDescending(item => item.RowKey)
.Select((t, index) => new City.Grid()
{
PartitionKey = t.PartitionKey,
RowKey = t.RowKey,
Row = index + 1,
ShortTitle = t.ShortTitle,
})
What I would like to do is to do a sort on the following:
1) First four characters or field RowKey
2) ShortTitle
I am not sure how to do a sort on just a few characters and also not sure how to do a secondary sort.
For the first four characters, include that in your existing statement, then add the ShortTitle afterwards