Ejemplo n.º 1
0
        public IHttpActionResult CreateStepParagraph(StepParagraphRequest request)
        {
            StepParagraphMessage message = new StepParagraphMessage();
            List <string>        errors  = ValidateCreateStepParagraph(request);

            if (errors != null && errors.Any())
            {
                message.ErrorMessage     = StepMessageResource.ValidationErrors;
                message.ErrorType        = ErrorType.ValidationError;
                message.Errors           = new List <string>();
                message.OperationSuccess = false;
                message.Errors.AddRange(errors);
            }
            else
            {
                message = _serviceStepParagraphClient.CreateStepParagraph(request);
            }
            return(Json(message));
        }
Ejemplo n.º 2
0
        public IHttpActionResult CreateStepParagraph(StepParagraphRequest request)
        {
            StepParagraphMessage message = serviceStepParagraphClient.CreateStepParagraph(request);

            return(Json(message));
        }