Beispiel #1
0
        public Result <MultiLineTextDto> Insert(MultiLineTextDto dtoToInsert)
        {
            Result <MultiLineTextDto> retResult = Result <MultiLineTextDto> .Undefined(null);

            try
            {
                Common.CommonHelper.CheckAuthentication();

                var insertedDto = InsertImpl(dtoToInsert);
                retResult = Result <MultiLineTextDto> .Success(insertedDto);
            }
            catch (Exception ex)
            {
                var wrappedEx = new Exceptions.InsertFailedException(ex);
                retResult = Result <MultiLineTextDto> .FailureWithInfo(null, wrappedEx);
            }
            return(retResult);
        }
        public Result<PhraseDto> Insert(PhraseDto dtoToInsert)
        {
            Result<PhraseDto> retResult = Result<PhraseDto>.Undefined(null);
              try
              {
            Common.CommonHelper.CheckAuthentication();

            var insertedDto = InsertImpl(dtoToInsert);
            retResult = Result<PhraseDto>.Success(insertedDto);
              }
              catch (Exception ex)
              {
            var wrappedEx = new Exceptions.InsertFailedException(ex);
            retResult = Result<PhraseDto>.FailureWithInfo(null, wrappedEx);
              }
              return retResult;
        }