I have the following code:
public List<OversizeElement> GetOversizeRegulations(List<string> states)
{
var tmpList = (from i in _db.States
where states.Any(p=>i.Name == p)
select new
{
StateID = i.ID,
StateName = i.Name,
StateShortName = i.ShortName
}).ToList();
so, I select additional information for all states from 'states' variable. It works, but I need to get the same order, as in the 'states' variable. How to sort it? It requires IComparer object, but I can't imagine how to write it in my case