public async Task <IActionResult> PutTickets(int id, datamodels.Tickets tickets)
        {
            if (id != tickets.CodTicket)
            {
                return(BadRequest());
            }

            try
            {
                var mapaux = _mapper.Map <datamodels.Tickets, data.Tickets>(tickets);
                new CRPass.BS.Tickets(_context).Update(mapaux);
            }
            catch (Exception ee)
            {
                if (!TicketsExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        public async Task <ActionResult <datamodels.Tickets> > PostTickets(datamodels.Tickets tickets)
        {
            var mapaux = _mapper.Map <datamodels.Tickets, data.Tickets>(tickets);

            new CRPass.BS.Tickets(_context).Insert(mapaux);

            return(CreatedAtAction("GetTickets", new { id = tickets.CodTicket }, tickets));
        }