Beispiel #1
0
        static void insertSingleRecord()
        {
            //var newRec = new XElement("Employee", new XElement("EmpID", 103),
            //                      new XElement("EmpName", "Vinod Kumar"),
            //                      new XElement("EmpAddress", "Mysore"));

            var empRec = new EmpTable
            {
                EmpID      = 104,
                EmpName    = "Manoj Kumar",
                EmpAddress = "Kolkatta",
                DeptId     = 5
            };
            var context = new ExampleDataContext();

            context.EmpTables.InsertOnSubmit(empRec);
            context.SubmitChanges();
        }
 partial void DeleteEmpTable(EmpTable instance);
 partial void UpdateEmpTable(EmpTable instance);
 partial void InsertEmpTable(EmpTable instance);
 private void detach_EmpTables(EmpTable entity)
 {
     this.SendPropertyChanging();
     entity.DeptTable = null;
 }
 private void attach_EmpTables(EmpTable entity)
 {
     this.SendPropertyChanging();
     entity.DeptTable = this;
 }