Esempio n. 1
0
        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);
                }
            }
        }
Esempio n. 2
0
 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();
 }
Esempio n. 3
0
 public Customer()
 {
     this._Orders = new DbLinq.Data.Linq.EntitySet<Order>(new Action<Order>(this.attach_Orders), new Action<Order>(this.detach_Orders));
     OnCreated();
 }
Esempio n. 4
0
 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();
 }
Esempio n. 5
0
 public Supplier()
 {
     this._Products = new DbLinq.Data.Linq.EntitySet<Product>(new Action<Product>(this.attach_Products), new Action<Product>(this.detach_Products));
     OnCreated();
 }
Esempio n. 6
0
 public Region()
 {
     this._Territories = new DbLinq.Data.Linq.EntitySet<Territory>(new Action<Territory>(this.attach_Territories), new Action<Territory>(this.detach_Territories));
     OnCreated();
 }
Esempio n. 7
0
 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();
 }
Esempio n. 8
0
 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();
 }