Example #1
0
 public void GroupByQueryWithOrderByFieldNotInSelectList()
 {
     IEnumerable <Person> source = TestData.GetPeople();
     var result = source.Query <Person, IDictionary <string, object> >("SELECT Address, Avg(age) as A FROM this GROUP BY Address ORDER BY Name");
 }
Example #2
0
 public void LongGroupByExpressionGenerateExpcetion()
 {
     IEnumerable <Person> source = TestData.GetPeople();
     var result = source.Query <Person, IDictionary <string, object> >("SELECT Name1, Name2, Name3, Name4, Name5, Name6, Name7, Name8, Name9, Avg(age) as A FROM this GROUP BY Name1, Name2, Name3, Name4, Name5, Name6, Name7, Name8, Name9");
 }
Example #3
0
 public void DistinctQueryWithOrderByFieldNotInSelectList()
 {
     IEnumerable <Person> source = TestData.GetPeople();
     var result = source.Query <Person, IDictionary <string, object> >("SELECT DISTINCT Name FROM this ORDER BY Age");
 }
Example #4
0
 public void WhereClauseWithAggregate()
 {
     IEnumerable <Person> source = TestData.GetPeople();
     var result = source.Query <Person, IDictionary <string, object> >("SELECT Age FROM this WHERE Avg(Age) > 40");
 }
Example #5
0
 public void GroupByWithoutAggregate()
 {
     IEnumerable <Person> source = TestData.GetPeople();
     var result = source.Query <Person, IDictionary <string, object> >("SELECT Address FROM this GROUP BY Address");
 }
Example #6
0
 public void AggregateWithoutGroupBy()
 {
     IEnumerable <Person> source = TestData.GetPeople();
     var result = source.Query <Person, IDictionary <string, object> >("SELECT Name, Count(*) FROM this");
 }
Example #7
0
 public void SelecFieldtWithoutGroupingOnIt()
 {
     IEnumerable <Person> source = TestData.GetPeople();
     var result = source.Query <Person, IDictionary <string, object> >("SELECT Name, Address, Avg(Age) AS AverageAge FROM this GROUP BY Address");
 }