public bool DeleteEmployee(Employee employee) { bool isDeleted; try { isDeleted = _userAccessor.DeleteEmployee(employee.EmployeeId, employee.FirstName, employee.LastName); } catch (Exception ex) { throw new ApplicationException("Unable to delete Employee: " + employee.EmployeeId, ex); } return isDeleted; }
public bool RemoveEmployee(int employeeID) { bool oneRowRemoved = false; try { oneRowRemoved = (1 == _userAccessor.DeleteEmployee(employeeID)); } catch (Exception ex) { throw new ApplicationException("Employee Could Not Be Removed", ex); } return(oneRowRemoved); }