NLite.Data.Test.NorthwindExecutionTest.TestAllWithLocalCollection C# (CSharp) Method

TestAllWithLocalCollection() private method

private TestAllWithLocalCollection ( ) : void
return void
        public virtual void TestAllWithLocalCollection()
        {
            // get all customers with a name that contains both 'm' and 'd'  (don't use vowels since these often depend on collation)
            string[] patterns = new[] { "m", "d" };

            var list = db.Customers.Where(c => patterns.All(p => c.ContactName.ToLower().Contains(p))).Select(c => c.ContactName);
            var local = db.Customers.AsEnumerable().Where(c => patterns.All(p => c.ContactName.ToLower().Contains(p))).Select(c => c.ContactName).ToList();

            AssertValue(local.Count, list.Count());
        }
NorthwindExecutionTest