示例#1
0
 public void QueryEntitySets()
 {
     Assert.AreEqual(8, context.CreateQuery <IQDSP.Category>("Categories").ToList().Count());
     Assert.AreEqual(0, context.CreateQuery <IQDSP.CustomerCustomerDemo>("CustomerCustomerDemos").ToList().Count());
     Assert.AreEqual(0, context.CreateQuery <IQDSP.CustomerDemographic>("CustomerDemographics").ToList().Count());
     Assert.AreEqual(91, context.CreateQuery <IQDSP.Customer>("Customers").ToList().Count());
     Assert.AreEqual(9, context.CreateQuery <IQDSP.Employee>("Employees").ToList().Count());
     Assert.AreEqual(49, context.CreateQuery <IQDSP.EmployeeTerritory>("EmployeeTerritories").ToList().Count());
     Assert.AreEqual(2155, context.CreateQuery <IQDSP.OrderDetail>("OrderDetails").ToList().Count());
     Assert.AreEqual(830, context.CreateQuery <IQDSP.Order>("Orders").ToList().Count());
     Assert.AreEqual(77, context.CreateQuery <IQDSP.Product>("Products").ToList().Count());
     Assert.AreEqual(4, context.CreateQuery <IQDSP.Region>("Regions").ToList().Count());
     Assert.AreEqual(3, context.CreateQuery <IQDSP.Shipper>("Shippers").ToList().Count());
     Assert.AreEqual(29, context.CreateQuery <IQDSP.Supplier>("Suppliers").ToList().Count());
     Assert.AreEqual(53, context.CreateQuery <IQDSP.Territory>("Territories").ToList().Count());
 }