public async Task <IActionResult> AddStockItem(Dto.StockItem stockItemDto) { var stockItem = _mapper.Map <Types.StockItem>(stockItemDto); await _stockUpdateService.AddAsync(stockItem); return(Ok()); }
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)))); }