예제 #1
0
        protected async Task HandleSubmit()
        {
            if (!EditContext.Validate())
            {
                return;
            }

            if (ProductId == Guid.Empty)
            {
                await ProductGateway.CreateProduct(Product);
            }
            else
            {
                await ProductGateway.UpdateProduct(Product, ProductId);
            }

            NavigationManager.NavigateTo("products");
        }