Ejemplo n.º 1
0
        public async Task <ActionResult> UpdateTicket(int id, TicketDTO ticketDto)
        {
            var ticketFromRepo = await _repo.GetById(id);

            if (ticketFromRepo == null)
            {
                return(NotFound());
            }

            _mapper.Map(ticketDto, ticketFromRepo);

            _repo.UpdateEntity(ticketFromRepo);

            await _repo.SaveChanges();

            return(NoContent());
        }