public void TestExcept() { const int resultRowCount = 2; // create QueryDesigner with ElementType == Products var queryDesinger = new QueryDesigner(context, typeof(Products)); //create root node which elementType has the same type in queryDesigner var root = new JoinNode(typeof(Products)); // create child node Categories with propertyName "Products". // Because Categories linked with Products by next property: // public EntitySet<Products> Products var categoryNode = new JoinNode(typeof(Categories), "Category", "Products"); // add categoryNode to root node root.AddChildren(categoryNode); // create filter by Products.ProductName like "%l%" var productNameCondition = new Condition("ProductName", "l", ConditionOperator.Like); root.AddConditions(productNameCondition); // create filter by Categories.Description like "Sweet%" var categoryNameCondition = new Condition("Description", "Sweet", ConditionOperator.StartsWith, typeof(Categories)); categoryNode.AddConditions(categoryNameCondition); // create ordering, because we call Skip and Take method. Ordering order = new Ordering("ProductName"); // make join Products table with Categories filtered by conditions // and ordered by already created ordering queryDesinger.Join(root, new OrderingList(order)); QueryDesigner cloneQueryDesigner = (QueryDesigner)queryDesinger.Clone(); queryDesinger.Skip(0).Take(3); cloneQueryDesigner.Skip(2).Take(4); queryDesinger.Except(cloneQueryDesigner); var list = new List<Products>(queryDesinger.Cast<Products>()); Assert.AreEqual(resultRowCount, list.Count); }