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);
public IActionResult GetAllOrderItems() { var orders = _orderItemService.GetAll(); return(Ok(orders)); }
private decimal GetTotalIncome() => _orderItemService.GetAll().Sum(oi => oi.Quantity * oi.UnitPrice);
public IActionResult Index() { return(View(_orderItemService.GetAll())); }
public async Task <IActionResult> GetAll() { var response = await _service.GetAll(); return(StatusCode(response.Code, response)); }