public async Task <Response <Ticket> > InsertTicketAsync(TicketAddDto Ticket) { Ticket TicketMap = _mapper.Map <Ticket>(Ticket); await _unitOfWork.TicketRepositoryAsync.AddAsync(TicketMap).ConfigureAwait(false); await _unitOfWork.CommitAsync(); return(new Response <Ticket>(TicketMap) { Succeeded = true, Message = $"El ticket No.{ TicketMap.Id } creado." }); }
public async Task <IActionResult> Post(TicketAddDto ticketAddDto) { return(Ok(await _ticket.InsertTicketAsync(ticketAddDto).ConfigureAwait(false)));; }