public ProductsPage( Category category, Subcategory subcategory ) { this.category = category; this.subcategory = subcategory; System.Diagnostics.Debug.WriteLine ( category.ToString() + " " + subcategory.ToString() ); InitializeComponents ().ConfigureAwait(false); }
public async Task EditSubcategory(Subcategory subcategory) { var subcategories = await context.Subcategories.FindAsync((Guid)subcategory.Id); if (subcategories != null) { subcategories.Name = subcategory.ToString(); context.Entry(subcategories).State = EntityState.Modified; } }
public void AddSubcategory(Subcategory subcategory) { var subcategories = new Subcategories() { Id = subcategory.Id, Category = subcategory.Category, Name = subcategory.ToString() }; context.Subcategories.Add(subcategories); }