コード例 #1
0
        public void TestCompareEntityEqual()
        {
            Customer customer = new Customer { CustomerID = "ALFKI" };
            var list = this.Northwind.Customers.Where(c => c == customer).ToList();

            Assert.AreEqual(1, list.Count);
            Assert.AreEqual("ALFKI", list[0].CustomerID);
        }
コード例 #2
0
 public void TestCompareEntityNotEqual()
 {
     Customer customer = new Customer { CustomerID = "ALFKI" };
     Assert.AreEqual(90, this.Northwind.Customers.Where(c => c != customer).Count());
 }
コード例 #3
0
 public void TestCompareEntityNotEqual()
 {
     Customer alfki = new Customer { CustomerID = "ALFKI" };
     TestQuery(
         this.Northwind.Customers.Where(c => c != alfki)
         );
 }