public async Task <ActionResult> UpdateEmployee(int Id, [FromBody] Database.Employee employee) { if (ModelState.IsValid) { try { var res = await employeeProvider.UpdateEmployeeAsync(Id, employee); if (res.IsSuccess) { return(Ok(res.EmployeeId)); } return(NotFound(res.ErrorMessage)); } catch (Exception ex) { return(BadRequest()); } } return(BadRequest()); }