Beispiel #1
0
        protected void Insert_Click(object sender, EventArgs e)
        {
            NorthwindDataContext db = new NorthwindDataContext();

            Product p1 = new Product { CategoryID = 1, ProductName = "Scott's Apple Juice", UnitPrice = 4.23m };
            db.Products.InsertOnSubmit(p1);
            db.SubmitChanges();
            ShowProducts();
        }
Beispiel #2
0
		private void detach_Products(Product entity)
		{
			this.SendPropertyChanging();
			entity.Category = null;
		}
Beispiel #3
0
		private void attach_Products(Product entity)
		{
			this.SendPropertyChanging();
			entity.Category = this;
		}
Beispiel #4
0
 partial void DeleteProduct(Product instance);
Beispiel #5
0
 partial void UpdateProduct(Product instance);
Beispiel #6
0
 partial void InsertProduct(Product instance);