public NewTicketModel GetNewTicketModel(NewTicketSpecification spec) { var model = wrapped.GetNewTicketModel(spec); AddAvailableSprints(model); return(model); }
public ActionResult Create(NewTicketSpecification spec) { var model = ticketModelFactory.Value.GetNewTicketModel(spec); var request = mapper.Map <CreateTicketRequest>(spec); var response = ticketCreator.Create(request); model.Response = mapper.Map <NewTicketResponse>(response); TempData.Add(NewModelKey, model); return(RedirectToAction(nameof(NewTicketController.Index))); }
public NewTicketResponse Put(NewTicketSpecification ticket) { if (ticket == null) { throw new ArgumentNullException(nameof(ticket)); } var request = mapper.Value.Map <CreateTicketRequest>(ticket); var response = ticketCreator.Value.Create(request); return(mapper.Value.Map <NewTicketResponse>(response)); }
public NewTicketModel GetNewTicketModel(NewTicketSpecification spec) { return(new NewTicketModel { Specification = spec, }); }