private void Insert() { using (var context = GetContext()) { try { for (int i = 0; i < 5; i++) { var person = new DbLinq.Data.Linq.EntitySet <Person>(); person.Add(new Person() { Person1 = "test" }); var tod = new TestTable() { Name = "tod", Description = "Record Insert.", Person = person }; context.TestTable.InsertOnSubmit(tod); } context.SubmitChanges(); } catch (Exception ex) { Console.WriteLine(ex.Message); } } }
public Employee() { this._Employees = new DbLinq.Data.Linq.EntitySet<Employee>(new Action<Employee>(this.attach_Employees), new Action<Employee>(this.detach_Employees)); this._EmployeeTerritories = new DbLinq.Data.Linq.EntitySet<EmployeeTerritory>(new Action<EmployeeTerritory>(this.attach_EmployeeTerritories), new Action<EmployeeTerritory>(this.detach_EmployeeTerritories)); this._Orders = new DbLinq.Data.Linq.EntitySet<Order>(new Action<Order>(this.attach_Orders), new Action<Order>(this.detach_Orders)); this._ReportsToEmployee = default(DbLinq.Data.Linq.EntityRef<Employee>); OnCreated(); }
public Customer() { this._Orders = new DbLinq.Data.Linq.EntitySet<Order>(new Action<Order>(this.attach_Orders), new Action<Order>(this.detach_Orders)); OnCreated(); }
public Territory() { this._EmployeeTerritories = new DbLinq.Data.Linq.EntitySet<EmployeeTerritory>(new Action<EmployeeTerritory>(this.attach_EmployeeTerritories), new Action<EmployeeTerritory>(this.detach_EmployeeTerritories)); this._Region = default(DbLinq.Data.Linq.EntityRef<Region>); OnCreated(); }
public Supplier() { this._Products = new DbLinq.Data.Linq.EntitySet<Product>(new Action<Product>(this.attach_Products), new Action<Product>(this.detach_Products)); OnCreated(); }
public Region() { this._Territories = new DbLinq.Data.Linq.EntitySet<Territory>(new Action<Territory>(this.attach_Territories), new Action<Territory>(this.detach_Territories)); OnCreated(); }
public Product() { this._OrderDetails = new DbLinq.Data.Linq.EntitySet<OrderDetail>(new Action<OrderDetail>(this.attach_OrderDetails), new Action<OrderDetail>(this.detach_OrderDetails)); this._Category = default(DbLinq.Data.Linq.EntityRef<Category>); this._Supplier = default(DbLinq.Data.Linq.EntityRef<Supplier>); OnCreated(); }
public Order() { this._OrderDetails = new DbLinq.Data.Linq.EntitySet<OrderDetail>(new Action<OrderDetail>(this.attach_OrderDetails), new Action<OrderDetail>(this.detach_OrderDetails)); this._Customer = default(DbLinq.Data.Linq.EntityRef<Customer>); this._Employee = default(DbLinq.Data.Linq.EntityRef<Employee>); this._Shipper = default(DbLinq.Data.Linq.EntityRef<Shipper>); OnCreated(); }