Answer the question
In order to leave comments, you need to log in
How to overcome the conversion error?
var i = SectionRepository.GetAll().OrderBy(x => x.Name).GroupBy(x => x.Category).OrderBy(x => x.Key.Name);
var b = (IOrderedEnumerable<IGrouping<TaggedEntity, TaggedEntity>>)i;
Answer the question
In order to leave comments, you need to log in
In your case, i is a pending complex query/select that has not yet been executed. You are trying to convert it to another type. Try it, just in case, first close ToList() and then convert it either via Select or Cast. In principle, if there is nothing complicated inside the request, then you can not do ToList().
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question