I have this controller that return a grid but I would like to make some modification so my search result are order by location.
I have a table Master List that contain LastName, FirstName, and others fields and has one foreign key that is LocationID that is related to a Table phoneList Location and its primary key is ID.
My current controller work and return a result set:
var masterLists = db.MasterLists.Include(m => m.PhoneListLocation);
But when I made some modification bellow I get an error:
var masterLists = from r in db.MasterLists.Include(m => m.PhoneListLocation)
The model item passed into the dictionary is of type 'System.Collections.Generi
but this dictionary requires a model item of type 'System.Collections.Generi