public Result <MultiLineTextDto> Update(MultiLineTextDto dtoToUpdate) { Result <MultiLineTextDto> retResult = Result <MultiLineTextDto> .Undefined(null); try { Common.CommonHelper.CheckAuthentication(); var updatedDto = UpdateImpl(dtoToUpdate); retResult = Result <MultiLineTextDto> .Success(updatedDto); } catch (Exception ex) { var wrappedEx = new Exceptions.UpdateFailedException(ex); retResult = Result <MultiLineTextDto> .FailureWithInfo(null, wrappedEx); } return(retResult); }
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); }
public Result<PhraseDto> Update(PhraseDto dtoToUpdate) { Result<PhraseDto> retResult = Result<PhraseDto>.Undefined(null); try { Common.CommonHelper.CheckAuthentication(); var updatedDto = UpdateImpl(dtoToUpdate); retResult = Result<PhraseDto>.Success(updatedDto); } catch (Exception ex) { var wrappedEx = new Exceptions.UpdateFailedException(ex); retResult = Result<PhraseDto>.FailureWithInfo(null, wrappedEx); } return retResult; }
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; }