protected abstract UserDto InsertImpl(UserDto dto);
protected abstract UserDto UpdateImpl(UserDto dto);
public Result<UserDto> Update(UserDto dto) { Result<UserDto> retResult = Result<UserDto>.Undefined(null); try { Common.CommonHelper.CheckAuthentication(); DalHelper.CheckAuthorizationToAddUser(); DalHelper.CheckAuthorizationToDeleteUser(); var updatedDto = UpdateImpl(dto); retResult = Result<UserDto>.Success(updatedDto); } catch (Exception ex) { var wrappedEx = new Exceptions.UpdateFailedException(ex); retResult = Result<UserDto>.FailureWithInfo(null, wrappedEx); } return retResult; }