public IList <Ticket> GetAll()
        {
            List <Ticket>    tickets = new List <Ticket>();
            TicketsReadEvent output  = ticketService.List(new ReadTicketsEvent());

            foreach (TicketDetails ticket in output.Object)
            {
                tickets.Add(Ticket.FromTicketDetails(ticket));
            }
            return(tickets);
        }
        public TicketsReadEvent List(ReadTicketsEvent @event)
        {
            TicketsReadEvent outputEvt = new TicketsReadEvent();

            List <Ticket> entities = ticketRepository.FindAll().ToList();

            if (!entities.Any())
            {
                return(new TicketsReadEvent().NotFound());
            }

            List <TicketDetails> output = new List <TicketDetails>();

            foreach (Ticket entity in entities)
            {
                output.Add(entity.ToTicketDetails());
            }

            return(outputEvt);
        }