//GET DETAIL EMPLOYEE public static EmployeeViewModel GetDetailEmployeeById(int paramEmpId) { EmployeeViewModel result = new EmployeeViewModel(); using (var db = new MarkomApplicationDBEntities()) { var res = db.spEmployeeDetailByID(paramEmpId); result = res.Select(c => new EmployeeViewModel { id = c.id, code = c.employee_number, firstName = c.first_name, lastName = c.last_name, mCompanyId = c.m_company_id, companyName = c.name, email = c.email }).FirstOrDefault(); } return(result); }