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