/// <summary> /// API to edit an employee with admin /// </summary> /// <param name="employee"></param> /// <returns></returns> public IHttpActionResult PostEditEmployeeWithAdmin(Employee employee) { _Logger.Info("PostEditEmployeeWithAdmin API called."); try { _ExceptionCheck.ValidateEmployee(employee); bool Check = _BusinessOperations.UpdateEmployeeWithAdmin(employee); if (Check == false) { _Logger.Error("Employee Not Updated"); return(base.NotFound()); } else { return(base.Ok(EmployeeAPIController._Employee)); } } catch (EmployeeManagementExceptions exception) { _Logger.Error(exception.ToString()); return(InternalServerError(exception)); } catch (MySqlException exception) { _Logger.Error(exception.ToString()); return(Content((HttpStatusCode)422, "Database Error")); } catch (Exception ex) { _Logger.Fatal(ex.ToString()); return(InternalServerError(ex)); } }