I have a linq query and inside of it is the month name. I want the results sorted by the month (Jan, Feb, Mar, ...).
Currently I have the below but it\'s giving me and e
If you dont want to create a table in your database, you can do like
var names = DateTimeFormatInfo.CurrentInfo.MonthNames .Take(12).Select(s => new[] {s.Substring(0,3)});
And then order against a separate list.
orderby names.IndexOf(s.MonthName)