예제 #1
0
 public virtual void GroupJoin_outer_projection3()
 {
     AssertQuery <Customer, Order>(
         (cs, os) => cs.GroupJoin(os, c => c.CustomerID, o => o.CustomerID, (c, g) => new { g = g.Select(o => o.CustomerID) }),
         e => CollectionSorter <string>()(e.g),
         elementAsserter: (e, a) => CollectionAsserter <string>(s => s)(e.g, a.g));
 }
 public virtual Task GroupJoin_outer_projection3(bool isAsync)
 {
     return(AssertQuery(
                isAsync,
                ss => ss.Set <Customer>().GroupJoin(
                    ss.Set <Order>(), c => c.CustomerID, o => o.CustomerID, (c, g) => new { g = g.Select(o => o.CustomerID) }),
                elementSorter: e => CollectionSorter <string>()(e.g),
                elementAsserter: (e, a) => AssertCollection <string>(e.g, a.g)));
 }
예제 #3
0
 public virtual Task GroupJoin_outer_projection3(bool isAsync)
 {
     return(AssertQuery <Customer, Order>(
                isAsync,
                (cs, os) => cs.GroupJoin(
                    os, c => c.CustomerID, o => o.CustomerID, (c, g) => new { g = g.Select(o => o.CustomerID) }),
                e => CollectionSorter <string>()(e.g),
                elementAsserter: (e, a) => CollectionAsserter <string>(s => s)(e.g, a.g)));
 }
예제 #4
0
 public virtual void GroupJoin_outer_projection2()
 {
     AssertQuery <Customer, Order>(
         (cs, os) => cs.GroupJoin(os, c => c.CustomerID, o => o.CustomerID, (c, g) => new { c.City, g = g.Select(o => o.CustomerID) }),
         e => e.City + " " + CollectionSorter <string>()(e.g),
         elementAsserter: (e, a) =>
     {
         Assert.Equal(e.City, a.City);
         CollectionAsserter <string>(s => s)(e.g, a.g);
     });
 }
예제 #5
0
 public virtual void GroupJoin_outer_projection()
 {
     AssertQuery <Customer, Order>(
         (cs, os) => cs.GroupJoin(os, c => c.CustomerID, o => o.CustomerID, (c, o) => new { c.City, o }),
         e => e.City + " " + CollectionSorter <Order>()(e.o),
         elementAsserter: (e, a) =>
     {
         Assert.Equal(e.City, a.City);
         CollectionAsserter <Order>(o => o.OrderID)(e.o, a.o);
     },
         entryCount: 830);
 }
 public virtual Task GroupJoin_outer_projection2(bool isAsync)
 {
     return(AssertQuery <Customer, Order>(
                isAsync,
                (cs, os) => cs.GroupJoin(
                    os, c => c.CustomerID, o => o.CustomerID, (c, g) => new { c.City, g = g.Select(o => o.CustomerID) }),
                elementSorter: e => (e.City, CollectionSorter <string>()(e.g)),
                elementAsserter: (e, a) =>
     {
         Assert.Equal(e.City, a.City);
         AssertCollection <string>(e.g, a.g);
     }));
 }
 public virtual Task GroupJoin_outer_projection(bool isAsync)
 {
     return(AssertQuery(
                isAsync,
                ss => ss.Set <Customer>().GroupJoin(
                    ss.Set <Order>(), c => c.CustomerID, o => o.CustomerID, (c, o) => new { c.City, o }),
                elementSorter: e => (e.City, CollectionSorter <Order>()(e.o)),
                elementAsserter: (e, a) =>
     {
         Assert.Equal(e.City, a.City);
         AssertCollection <Order>(e.o, a.o);
     },
                entryCount: 830));
 }
 public virtual Task GroupJoin_outer_projection(bool isAsync)
 {
     return(AssertQuery <Customer, Order>(
                isAsync,
                (cs, os) => cs.GroupJoin(
                    os, c => c.CustomerID, o => o.CustomerID, (c, o) => new { c.City, o }),
                e => (e.City, CollectionSorter <Order>()(e.o)),
                elementAsserter: (e, a) =>
     {
         Assert.Equal(e.City, a.City);
         CollectionAsserter <Order>(o => o.OrderID)(e.o, a.o);
     },
                entryCount: 830));
 }
        public void SortChildren()
        {
            CollectionSorter cs = new CollectionSorter(CollectionSorter.SortOrder.Ascending, "Caption");

            if (this.ChildNodes.Count > 0)
            {
                this.ChildNodes.Sort(cs);
            }
        }
예제 #10
0
 public static Func <dynamic, dynamic> GroupingSorter <TKey, TElement>()
 => e => ((IGrouping <TKey, TElement>)e).Key + " " + CollectionSorter <TElement>()(e);