Exemple #1
0
        public IActionResult Get()
        {
            var orderItems    = _orderItemService.GetAll();
            var orderItemDtos = _mapper.Map <IList <OrderItemDto> >(orderItems);

            return(Ok(orderItemDtos));
        }
        public ActionResult <List <OrderItemDTO> > GetAll()
        {
            var result = orderItemService.GetAll();

            return(result);
        }
 // GET: api/OrderItems
 public async Task <IEnumerable <OrderItem> > Get(CancellationToken ct)
 => await _service.GetAll().ToListAsync(ct);
Exemple #4
0
        public IActionResult GetAllOrderItems()
        {
            var orders = _orderItemService.GetAll();

            return(Ok(orders));
        }
Exemple #5
0
 private decimal GetTotalIncome() =>
 _orderItemService.GetAll().Sum(oi => oi.Quantity * oi.UnitPrice);
 public IActionResult Index()
 {
     return(View(_orderItemService.GetAll()));
 }
Exemple #7
0
        public async Task <IActionResult> GetAll()
        {
            var response = await _service.GetAll();

            return(StatusCode(response.Code, response));
        }