示例#1
0
    public Result<PhraseDto> New(object criteria)
    {
      Result<PhraseDto> retResult = Result<PhraseDto>.Undefined(null);
      try
      {
        Common.CommonHelper.CheckAuthentication();

        var dto = NewImpl(criteria);
        retResult = Result<PhraseDto>.Success(dto);
      }
      catch (Exception ex)
      {
        var wrappedEx = new Exceptions.CreateFailedException(ex);
        retResult = Result<PhraseDto>.FailureWithInfo(null, wrappedEx);
      }
      return retResult;
    }
示例#2
0
        public Result <MultiLineTextDto> New(object criteria)
        {
            Result <MultiLineTextDto> retResult = Result <MultiLineTextDto> .Undefined(null);

            try
            {
                Common.CommonHelper.CheckAuthentication();

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