예제 #1
0
        protected override string GetMappedDtoJsonMsg(ISdkTicket sdkTicket)
        {
            var ticket = sdkTicket as ITicketCashout;
            var dto    = _ticketMapper.Map(ticket);

            return(dto.ToJson());
        }
예제 #2
0
        private List <TicketModel> loadTickets()
        {
            var tickets = _ticketService.GetTickets();

            var mapped = _mapper.Map(tickets.Values);

            //todo: better way of doing this
            foreach (var entry in mapped)
            {
                entry.TicketUrl = new Uri(_redmineBaseUrl + "issues/" + entry.TicketNumber);
            }

            return(mapped);
        }
예제 #3
0
        public async Task <IEnumerable <TicketForListModel> > GetAllTicketsAsync()
        {
            List <Ticket> tickets;

            using (var uow = unitOfWorkFactory.GetUnitOfWork())
            {
                tickets = await uow.TicketRepository.GetAll().Include(t => t.User).ToListAsync();
            }
            return(tickets.Select(t => ticketMapper.Map(t)));
        }