protected void btInsertar_Click(object sender, EventArgs e) { try { // Instancio el contexto de datos: mi conexión con la BD NortWndDataContext bd = new NortWndDataContext(); Products miProducto2 = new Products(); bd.Products.InsertOnSubmit(miProducto2); bd.SubmitChanges(); } catch ( Exception ex ) { } }
private void detach_Products(Products entity) { this.SendPropertyChanging(); entity.Categories = null; }
private void attach_Products(Products entity) { this.SendPropertyChanging(); entity.Categories = this; }
partial void DeleteProducts(Products instance);
partial void UpdateProducts(Products instance);
partial void InsertProducts(Products instance);