Esempio n. 1
0
        public async Task <IActionResult> AddStockItem(Dto.StockItem stockItemDto)
        {
            var stockItem = _mapper.Map <Types.StockItem>(stockItemDto);
            await _stockUpdateService.AddAsync(stockItem);

            return(Ok());
        }
Esempio n. 2
0
        public async Task <ActionResult <List <Dto.StockItem> > > SearchStockItems(Dto.StockItem searchItemDto)
        {
            var searchItem = _mapper.Map <Types.StockItem>(searchItemDto);
            var results    = await _stockQueryService.SearchStockAsync(searchItem);

            return(Ok(new Dto.Response <List <Dto.StockItem> >(_mapper.Map <List <Dto.StockItem> >(results))));
        }