public void Contains14(string context) { var ps = Parent1.OrderBy(p => p.ParentID).Take(2).ToArray(); using (var db = GetDataContext(context)) Array.ForEach(ps, p => TestContains(db, p)); }
public void Contains14([DataSources] string context) { var ps = Parent1.OrderBy(p => p.ParentID).Take(2).ToArray(); using (var db = GetDataContext(context)) foreach (var p in ps) { TestContains(db, p); } }
public void OrderBySelectMany2() { var expected = from p in Parent1.OrderBy(p => p.ParentID) from c in Child.OrderBy(c => c.ChildID) where p.ParentID == c.Parent1.ParentID select new { p.ParentID, c.ChildID }; ForEachProvider(db => { var result = from p in db.Parent1.OrderBy(p => p.ParentID) from c in db.Child.OrderBy(c => c.ChildID) where p == c.Parent1 select new { p.ParentID, c.ChildID }; Assert.IsTrue(result.ToList().SequenceEqual(expected)); }); }
public void OrderBySelectMany2([DataSources] string context) { using (var db = GetDataContext(context)) { var expected = from p in Parent1.OrderBy(p => p.ParentID) from c in Child.OrderBy(c => c.ChildID) where p.ParentID == c.Parent1 !.ParentID select new { p.ParentID, c.ChildID }; var result = from p in db.Parent1.OrderBy(p => p.ParentID) from c in db.Child.OrderBy(c => c.ChildID) where p == c.Parent1 select new { p.ParentID, c.ChildID }; Assert.IsTrue(result.ToList().SequenceEqual(expected)); } }
public void Contains14() { var ps = Parent1.OrderBy(p => p.ParentID).Take(2).ToArray(); ForEachProvider(db => Array.ForEach(ps, p => TestContains(db, p))); }