public Result<ICollection<PhraseDto>> GetAll()
        {
            Result<ICollection<PhraseDto>> retResult = Result<ICollection<PhraseDto>>.Undefined(null);
              try
              {
            Common.CommonHelper.CheckAuthentication();

            var allDtos = GetAllImpl();
            retResult = Result<ICollection<PhraseDto>>.Success(allDtos);
              }
              catch (Exception ex)
              {
            var wrappedEx = new Exceptions.GetAllFailedException(ex);
            retResult = Result<ICollection<PhraseDto>>.FailureWithInfo(null, wrappedEx);
              }
              return retResult;
        }
Example #2
0
        public Result <ICollection <MultiLineTextDto> > GetAll()
        {
            Result <ICollection <MultiLineTextDto> > retResult = Result <ICollection <MultiLineTextDto> > .Undefined(null);

            try
            {
                Common.CommonHelper.CheckAuthentication();

                var allDtos = GetAllImpl();
                retResult = Result <ICollection <MultiLineTextDto> > .Success(allDtos);
            }
            catch (Exception ex)
            {
                var wrappedEx = new Exceptions.GetAllFailedException(ex);
                retResult = Result <ICollection <MultiLineTextDto> > .FailureWithInfo(null, wrappedEx);
            }
            return(retResult);
        }