Exemple #1
0
        //
        // Products/Create
        public ActionResult Create()
        {
            var product = new Product();
            UpdateModel( product );

            northwind.AddProduct( product );
            northwind.SubmitChanges();

            return RedirectToAction( "Category", new { ID = product.CategoryID } );
        }
 // Add a New Product
 public void AddProduct( Product product )
 {
     Products.InsertOnSubmit( product );
 }
Exemple #3
0
 partial void UpdateProduct( Product instance );
Exemple #4
0
 partial void DeleteProduct( Product instance );
Exemple #5
0
 partial void InsertProduct( Product instance );
Exemple #6
0
 private void detach_Products( Product entity )
 {
     SendPropertyChanging();
     entity.Category = null;
 }
Exemple #7
0
 private void attach_Products( Product entity )
 {
     SendPropertyChanging();
     entity.Category = this;
 }
Exemple #8
0
 private void detach_Products( Product entity )
 {
     SendPropertyChanging();
     entity.Supplier = null;
 }
Exemple #9
0
 private void attach_Products( Product entity )
 {
     SendPropertyChanging();
     entity.Supplier = this;
 }