Exemple #1
0
        public ActionResult <IEnumerable <IndexOrderDto> > GetOrders()
        {
            var orders = _query.Get();
            var items  =
                _mapper.Map <IEnumerable <Order>, List <IndexOrderDto> >(orders);

            return(items);
        }
Exemple #2
0
        public void GetShouldReturnAll()
        {
            _orderList.Add(new Order {
                OrderId = _random.Next()
            });
            var result = _query.Get().ToList();

            result.Count.Should().Be(1);
        }