protected override string GetMappedDtoJsonMsg(ISdkTicket sdkTicket) { var ticket = sdkTicket as ITicketCashout; var dto = _ticketMapper.Map(ticket); return(dto.ToJson()); }
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); }
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))); }