public static List <EventViewModel> GetAllEmpName() { List <EventViewModel> result = new List <EventViewModel>(); try { using (MarkomApplicationDBEntities db = new MarkomApplicationDBEntities()) { var res = db.spGetEmpNameStaff(); List <EventViewModel> comList = res.Select(c => new EventViewModel { empId = c.id, empFullName = c.first_name + " " + c.last_name, }).ToList(); result = comList; } } catch (Exception ex) { Message = ex.Message; } return(result); }