I am stuck on an issue here. I have a column called Title and the titles look like this
AAA Interior, BBB Interior, CCC Interior, AAA End, BBB End, CCC End.
What I am trying to do is get the Title column in alphabetical and have them in order or Interior then End so my data looks like this:
AAA Interior, AAA End, BBB Interior, BBB End, CCC Interior, CCC End.
This is what I tried:
var results = qry.GroupBy(x => x.Title).Select(x => new { x.FirstOrDefault().Type, x.FirstOrDefault().Title, x.FirstOrDefault().Plan, x.FirstOrDefault().Id, x.FirstOrDefault().Image }).ToList();
results = results.OrderBy(x => x.Title).OrderByDescending(x => x.Plan.FirstOrDefault().Title == "Interior").ToList();
But it gives me this result:
AAA Interior, BBB Interior, CCC Interior, AAA End, BBB End, CCC End.
What am I doing wrong?