public async Task <ActionResult <IEnumerable <PublicApi.v1.DTO.ProductInOrder> > > GetInfoByOrderId(int id) { var productInOrder = (await _bll.ProductsInOrder.AllAsyncByShopAndOrderId(id, User.GetShopId())) .Select(e => ProductInOrderMapper.MapFromBLL(e)).ToList(); return(productInOrder); }
public async Task <ActionResult <PublicApi.v1.DTO.ProductInOrder> > GetProductInOrder(int id) { var productInOrder = await _bll.ProductsInOrder.GetAsyncByShopAndIdDTO(id, User.GetShopId()); if (productInOrder == null) { return(NotFound()); } return(ProductInOrderMapper.MapFromBLL(productInOrder)); }