Ejemplo n.º 1
0
        public Result <TranslationDto> Update(TranslationDto dtoToUpdate)
        {
            Result <TranslationDto> retResult = Result <TranslationDto> .Undefined(null);

            try
            {
                Common.CommonHelper.CheckAuthentication();

                var updatedDto = UpdateImpl(dtoToUpdate);
                retResult = Result <TranslationDto> .Success(updatedDto);
            }
            catch (Exception ex)
            {
                var wrappedEx = new Exceptions.UpdateFailedException(ex);
                retResult = Result <TranslationDto> .FailureWithInfo(null, wrappedEx);
            }
            return(retResult);
        }
Ejemplo n.º 2
0
        public Result <TranslationDto> Insert(TranslationDto dtoToInsert)
        {
            Result <TranslationDto> retResult = Result <TranslationDto> .Undefined(null);

            try
            {
                Common.CommonHelper.CheckAuthentication();

                var insertedDto = InsertImpl(dtoToInsert);
                retResult = Result <TranslationDto> .Success(insertedDto);
            }
            catch (Exception ex)
            {
                var wrappedEx = new Exceptions.InsertFailedException(ex);
                retResult = Result <TranslationDto> .FailureWithInfo(null, wrappedEx);
            }
            return(retResult);
        }
Ejemplo n.º 3
0
 protected abstract TranslationDto InsertImpl(TranslationDto dto);
Ejemplo n.º 4
0
 protected abstract TranslationDto UpdateImpl(TranslationDto dto);
 protected abstract TranslationDto UpdateImpl(TranslationDto dto);
 protected abstract TranslationDto InsertImpl(TranslationDto dto);
        public Result<TranslationDto> Update(TranslationDto dtoToUpdate)
        {
            Result<TranslationDto> retResult = Result<TranslationDto>.Undefined(null);
              try
              {
            Common.CommonHelper.CheckAuthentication();

            var updatedDto = UpdateImpl(dtoToUpdate);
            retResult = Result<TranslationDto>.Success(updatedDto);
              }
              catch (Exception ex)
              {
            var wrappedEx = new Exceptions.UpdateFailedException(ex);
            retResult = Result<TranslationDto>.FailureWithInfo(null, wrappedEx);
              }
              return retResult;
        }
        public Result<TranslationDto> Insert(TranslationDto dtoToInsert)
        {
            Result<TranslationDto> retResult = Result<TranslationDto>.Undefined(null);
              try
              {
            Common.CommonHelper.CheckAuthentication();

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