Пример #1
0
        public Result<PhraseDto> Delete(Guid id)
        {
            Result<PhraseDto> retResult = Result<PhraseDto>.Undefined(null);
              try
              {
            Common.CommonHelper.CheckAuthentication();

            var dto = DeleteImpl(id);
            retResult = Result<PhraseDto>.Success(dto);
              }
              catch (Exception ex)
              {
            var wrappedEx = new Exceptions.DeleteFailedException(ex);
            retResult = Result<PhraseDto>.FailureWithInfo(null, wrappedEx);
              }
              return retResult;
        }
Пример #2
0
        public Result <MultiLineTextDto> Delete(Guid id)
        {
            Result <MultiLineTextDto> retResult = Result <MultiLineTextDto> .Undefined(null);

            try
            {
                Common.CommonHelper.CheckAuthentication();

                var dto = DeleteImpl(id);
                retResult = Result <MultiLineTextDto> .Success(dto);
            }
            catch (Exception ex)
            {
                var wrappedEx = new Exceptions.DeleteFailedException(ex);
                retResult = Result <MultiLineTextDto> .FailureWithInfo(null, wrappedEx);
            }
            return(retResult);
        }