public void TestCustomersIncludeOrdersViaConstructorOnly() { var mapping = new AttributeMapping(typeof(NorthwindX)); var policy = new EntityPolicy(); policy.IncludeWith <CustomerX>(c => c.Orders); NorthwindX nw = new NorthwindX(this.provider.New(policy).New(mapping)); TestQuery( nw.Customers ); }
public void TestCustomersIncludeOrdersViaConstructorOnly() { var mapping = new AttributeMapping(typeof(NorthwindX)); var policy = new EntityPolicy(); policy.IncludeWith<CustomerX>(c => c.Orders); NorthwindX nw = new NorthwindX(this.provider.New(policy).New(mapping)); var custs = nw.Customers.Where(c => c.CustomerID == "ALFKI").ToList(); AssertValue(1, custs.Count); AssertNotValue(null, custs[0].Orders); AssertValue(6, custs[0].Orders.Count); }