示例#1
0
		public void UserInsert()
		{
			using (var db = new TestDbManager("Oracle"))
			{
				db.BeginTransaction();
				db.Insert(new User { Name = "user" });
			}
		}
示例#2
0
		public void UserInsert([IncludeDataContexts("Oracle")] string context)
		{
			using (var db = new TestDbManager(context))
			{
				db.BeginTransaction();
				db.Insert(new User { Name = "user" });
			}
		}
示例#3
0
 public void UserInsert([IncludeDataContexts("Oracle")] string context)
 {
     using (var db = new TestDbManager(context))
     {
         db.BeginTransaction();
         db.Insert(new User {
             Name = "user"
         });
     }
 }
示例#4
0
 public void UserInsert()
 {
     using (var db = new TestDbManager("Oracle"))
     {
         db.BeginTransaction();
         db.Insert(new User {
             Name = "user"
         });
     }
 }
示例#5
0
 public void MyType3()
 {
     using (var db = new TestDbManager {
         MappingSchema = _myMappingSchema
     })
     {
         db.BeginTransaction();
         db.Insert(new MyParent {
             ParentID = new MyInt {
                 MyValue = 1001
             }, Value1 = 1001
         });
     }
 }
示例#6
0
        public void ContractInsert([IncludeDataContexts("Oracle")] string context)
        {
            using (var db = new TestDbManager(context))
            {
                db.BeginTransaction();

                var user = new User {
                    Name = "user"
                };
                user.Id = Convert.ToInt64(db.InsertWithIdentity(user));

                db.Insert(new Contract {
                    UserId = user.Id, ContractNo = 1, Name = "contract1"
                });
            }
        }
示例#7
0
		public void MyType3()
		{
			using (var db = new TestDbManager { MappingSchema = _myMappingSchema })
			{
				db.BeginTransaction();
				db.Insert(new MyParent { ParentID = new MyInt { MyValue = 1001 }, Value1 = 1001 });
				db.Parent.Delete(p => p.ParentID >= 1000);
			}
		}
示例#8
0
		public void ContractInsert()
		{
			using (var db = new TestDbManager("Oracle"))
			{
				db.BeginTransaction();

				var user = new User { Name = "user" };
				user.Id = Convert.ToInt64(db.InsertWithIdentity(user));

				db.Insert(new Contract { UserId = user.Id, ContractNo = 1, Name = "contract1" });
			}
		}