public void AddProduct(Product product) { using(var context = new ECommerceDbDataContext(_conStr)) { context.Products.InsertOnSubmit(product); context.SubmitChanges(); } }
private void detach_Products(Product entity) { this.SendPropertyChanging(); entity.Category = null; }
private void attach_Products(Product entity) { this.SendPropertyChanging(); entity.Category = this; }
partial void DeleteProduct(Product instance);
partial void UpdateProduct(Product instance);
partial void InsertProduct(Product instance);