public void UserInsert() { using (var db = new TestDbManager("Oracle")) { db.BeginTransaction(); db.Insert(new User { Name = "user" }); } }
public void UserInsert([IncludeDataContexts("Oracle")] string context) { using (var db = new TestDbManager(context)) { db.BeginTransaction(); db.Insert(new User { Name = "user" }); } }
public void MyType3() { using (var db = new TestDbManager { MappingSchema = _myMappingSchema }) { db.BeginTransaction(); db.Insert(new MyParent { ParentID = new MyInt { MyValue = 1001 }, Value1 = 1001 }); } }
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" }); } }
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); } }
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" }); } }