public void ContractInsertWithIdentity([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.InsertWithIdentity(new Contract { UserId = user.Id, ContractNo = 1, Name = "contract" }); } }
public void UserInsertWithIdentity() { using (var db = new TestDbManager("Oracle")) { db.BeginTransaction(); db.InsertWithIdentity(new User { Name = "user" }); } }
public void UserInsertWithIdentity([IncludeDataContexts("Oracle")] string context) { using (var db = new TestDbManager(context)) { db.BeginTransaction(); db.InsertWithIdentity(new User { Name = "user" }); } }
public void IsDbGeneratedTest() { using (var db = new TestDbManager("Sql2008")) { var id = db.InsertWithIdentity(new L2SPersons { FirstName = "Test", LastName = "Test", Gender = "M" }); db.GetTable<L2SPersons>().Delete(p => p.PersonID == ConvertTo<int>.From(id)); } }
public void IsDbGeneratedTest() { using (var db = new TestDbManager("Sql2008")) { var id = db.InsertWithIdentity(new L2SPersons { FirstName = "Test", LastName = "Test", Gender = "M" }); db.GetTable <L2SPersons>().Delete(p => p.PersonID == ConvertTo <int> .From(id)); } }
public void IsDbGeneratedTest([IncludeDataContexts("Sql2008", "Sql2012")] string context) { using (var db = new TestDbManager(context)) { db.BeginTransaction(); var id = db.InsertWithIdentity(new L2SPersons { FirstName = "Test", LastName = "Test", Gender = "M" }); db.GetTable<L2SPersons>().Delete(p => p.PersonID == ConvertTo<int>.From(id)); } }
public void ContractLinqManyInsert() { using (var db = new TestDbManager("Oracle")) { db.BeginTransaction(); var user = new User { Name = "user" }; user.Id = Convert.ToInt64(db.InsertWithIdentity(user)); db.GetTable <User>().Insert(db.GetTable <Contract>(), x => new Contract { UserId = x.Id, ContractNo = 1, Name = "contract" }); } }
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" }); } }
public void IsDbGeneratedTest([IncludeDataContexts("Sql2008", "Sql2012")] string context) { using (var db = new TestDbManager(context)) { db.BeginTransaction(); var id = db.InsertWithIdentity(new L2SPersons { FirstName = "Test", LastName = "Test", Gender = "M" }); db.GetTable <L2SPersons>().Delete(p => p.PersonID == ConvertTo <int> .From(id)); } }
//[Test] public void ContractLinqManyInsertWithIdentity() { using (var db = new TestDbManager("Oracle")) { db.BeginTransaction(); var user = new User { Name = "user" }; user.Id = Convert.ToInt64(db.InsertWithIdentity(user)); db.GetTable<User>().InsertWithIdentity(db.GetTable<Contract>(), x => new Contract { UserId = x.Id, ContractNo = 1, Name = "contract" }); } }
public void ContractLinqInsertWithIdentity([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.GetTable<Contract>().InsertWithIdentity(() => new Contract { UserId = user.Id, ContractNo = 1, Name = "contract" }); } }