public static string GetEmployeeName(int empId) { string result = string.Empty; using (var db = new MarkomApplicationDBEntities()) { var res = db.spEmpNameById(empId).Select(em => em.first_name + " " + em.last_name).FirstOrDefault(); //var q = res.Select(c => new EventViewModel //{ // empId = c.id, // firstName = c.first_name, // lastName = c.last_name //}).FirstOrDefault(); //result = q; result = res; } return(result); }