Exemplo n.º 1
0
        async Task InitializeUpdateAsync()
        {
            var result = await ProductGateway.GetProductByIdWithCategoriesAndAttributes(ProductId);

            if (result.IsValid)
            {
                var(product, categories, attributes) = result.Success;

                Categories = categories;
                Attributes = attributes.ToList();

                Product     = product;
                EditContext = new EditContext(Product);
            }

            IsValid = result.IsValid;
        }