var empList = from p in customers select new { p.Personnel_ID, p.PersonName }; var empTempList = empList.Distinct().ToList(); Dictionarydict = new Dictionary (); if (empTempList != null && empTempList.Count() > 0) { foreach (var item in empTempList) { dict.Add(item.Personnel_ID, item.PersonName); } } ViewBag.EmpList = dict;