void btnDisc_Click(object sender, EventArgs e) { Model.Shop prod = LoadProduct(int.Parse(this.tbProdId.Text)); if (prod != null) { prod.Discontinued = true; _session.SaveChanges(); } }
private void StoreProduct() { var product = new Model.Shop { Name = "Product Name", CategoryId = "categories/129", SupplierId = "suppliers/149", Code = "H11050", CreatedAt = DateTime.Now, StandardCost = 250, ListPrice = 189, PhotoFile = "/images/" }; _session.Store(product); _session.SaveChanges(); }
private void StoreProduct() { var product = new Model.Shop { Name = "Product Name", CategoryId = "categories/129", SupplierId = "suppliers/149", Code = "H11050", CreatedAt = DateTime.Now, StandardCost = 250, ListPrice = 189, PhotoFile = "/images/" }; _session.Store(product); _session.SaveChanges(); }