예제 #1
0
 protected abstract UserDto InsertImpl(UserDto dto);
예제 #2
0
 protected abstract UserDto UpdateImpl(UserDto dto);
예제 #3
0
    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;
    }