public void Execute(TicketDto request) { var ticket = _context.Tickets.Find(request.Id); if (ticket == null) { throw new EntityNotFoundException(request.Id, typeof(Ticket)); } _validator.ValidateAndThrow(request); _mapper.Map(request, ticket); _context.SaveChanges(); }