Esempio n. 1
0
        public CreateTicketResponse Create(CreateTicketRequest request)
        {
            var validationResult = ValidateRequest(request);

            if (!validationResult.IsSuccess)
            {
                return(responseCreator.GetResponse(validationResult));
            }

            var ticket = ticketFactory.CreateTicket(request);

            return(responseCreator.GetResponse(validationResult, ticket));
        }
Esempio n. 2
0
        IValidationResult ValidateRequest(CreateTicketRequest request)
        {
            var validator = validatorFactory.GetValidator();

            return(validator.Validate(request));
        }