コード例 #1
0
        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."
            });
        }
コード例 #2
0
 public async Task <IActionResult> Post(TicketAddDto ticketAddDto)
 {
     return(Ok(await _ticket.InsertTicketAsync(ticketAddDto).ConfigureAwait(false)));;
 }