I have this method and I have not been able to order my result. It wont order at all. Do you know what am doing wrong ?
public IEnumerable<SelectListItem> GetBranches()
{
List<SelectListItem> objList = null;
var strQuery = (from sl in _objDataCollection.Edmm_Tester
orderby sl.Code
select new SelectListItem() {Text = sl.Name, Value = sl.Code}).Distinct();
objList = strQuery.ToList();
retu objList;
}
