Ejemplo n.º 1
0
        public async Task <TradeContract> Get(string tradeId)
        {
            if (string.IsNullOrWhiteSpace(tradeId))
            {
                throw new ArgumentException("Trade id must be set", nameof(tradeId));
            }

            var trade = await _tradesRepository.GetAsync(tradeId);

            return(Convert(trade));
        }
Ejemplo n.º 2
0
 public async Task <IReadOnlyList <TradeModel> > GetTradesAsync([FromQuery] DateTime fromDate, [FromQuery] DateTime toDate)
 {
     return(Mapper.Map <IReadOnlyList <TradeModel> >(await _tradesRepository.GetAsync(fromDate, toDate)));
 }