Exemple #1
0
        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));
        }
Exemple #2
0
        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);
                }
        }
Exemple #3
0
        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));
            });
        }
Exemple #4
0
        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));
            }
        }
Exemple #5
0
        public void Contains14()
        {
            var ps = Parent1.OrderBy(p => p.ParentID).Take(2).ToArray();

            ForEachProvider(db => Array.ForEach(ps, p => TestContains(db, p)));
        }