public virtual async Task OnGetAsync() { var dto = await _service.GetAsync(ProductId, ProductSkuId); ViewModel = new ChangeProductInventoryViewModel { ChangedInventory = 0, ProductInventoryChangeType = InventoryChangeType.IncreaseInventory }; }
public virtual async Task OnGetAsync() { var product = await _service.GetAsync(ProductId); product.GetSkuById(ProductSkuId); // ensure the specified sku exists. ViewModel = new ChangeProductInventoryViewModel { ChangedInventory = 0, ProductInventoryChangeType = InventoryChangeType.IncreaseInventory }; }