예제 #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();
        }
예제 #2
0
		private void detach_Products(Product entity)
		{
			this.SendPropertyChanging();
			entity.Category = null;
		}
예제 #3
0
		private void attach_Products(Product entity)
		{
			this.SendPropertyChanging();
			entity.Category = this;
		}
예제 #4
0
 partial void DeleteProduct(Product instance);
예제 #5
0
 partial void UpdateProduct(Product instance);
예제 #6
0
 partial void InsertProduct(Product instance);