Пример #1
0
        public async Task <Ticket> CreateTicketAsync(UpdateTicketRequest ticketRequest)
        {
            var mappedRequest = _mapper.Map <TicketDb>(ticketRequest);

            mappedRequest.Created = DateTime.UtcNow;

            var added = _tCntx.Tickets.Add(mappedRequest);

            await _tCntx.SaveChangesAsync();

            return(_mapper.Map <Ticket>(added));
        }
 public Task SaveTicketAsync(CurrencyExchangeTicket currencyExchangeTicket)
 {
     _context.Tickets.Add(Mapper.Map <Data.Access.BankManagement.CurrencyExchangeTicket>(currencyExchangeTicket));
     return(_context.SaveChangesAsync());
 }