예제 #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);
                }
            }
        }
예제 #2
0
파일: Northwind.cs 프로젝트: symform/mono
 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();
 }
예제 #3
0
파일: Northwind.cs 프로젝트: symform/mono
 public Customer()
 {
     this._Orders = new DbLinq.Data.Linq.EntitySet<Order>(new Action<Order>(this.attach_Orders), new Action<Order>(this.detach_Orders));
     OnCreated();
 }
예제 #4
0
파일: Northwind.cs 프로젝트: symform/mono
 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();
 }
예제 #5
0
파일: Northwind.cs 프로젝트: symform/mono
 public Supplier()
 {
     this._Products = new DbLinq.Data.Linq.EntitySet<Product>(new Action<Product>(this.attach_Products), new Action<Product>(this.detach_Products));
     OnCreated();
 }
예제 #6
0
파일: Northwind.cs 프로젝트: symform/mono
 public Region()
 {
     this._Territories = new DbLinq.Data.Linq.EntitySet<Territory>(new Action<Territory>(this.attach_Territories), new Action<Territory>(this.detach_Territories));
     OnCreated();
 }
예제 #7
0
파일: Northwind.cs 프로젝트: symform/mono
 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();
 }
예제 #8
0
파일: Northwind.cs 프로젝트: symform/mono
 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();
 }