public void Insert11() { var p = new TestPerson1 { Name = new FullName { FirstName = "fn", LastName = "ln" }, Gender = "M" }; ForEachProvider(db => db.Insert(p)); }
public void Insert11(string context) { var p = new TestPerson1 { Name = new FullName { FirstName = "fn", LastName = "ln" }, Gender = "M" }; using (var db = GetDataContext(context)) { var id = db.Person.Max(t => t.ID); try { db.Insert(p); } finally { db.Person.Delete(t => t.ID > id); } } }
public void Insert11([DataContexts] string context) { var p = new TestPerson1 { Name = new FullName { FirstName = "fn", LastName = "ln" }, Gender = "M" }; using (var db = GetDataContext(context)) { var id = db.Person.Max(t => t.ID); try { db.Insert(p); } finally { db.Person.Delete(t => t.ID > id); } } }