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
Something like this should work
var shockValues = ctx.Shocks.Where(s => s.ID == id).Select(x => new {x.MonthName, MonthNum = x.MonthName == "Jan" : 1 ? x.MonthName == "Feb" : 2 ? 0}).OrderBy(s => MonthNum).Select(s => new {val = s.MonthName + "=" + s.ShockValue}