Esempio n. 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");
 }
Esempio n. 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");
 }
Esempio n. 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");
 }
Esempio n. 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");
 }
Esempio n. 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");
 }
Esempio n. 6
0
 public void AggregateWithoutGroupBy()
 {
     IEnumerable <Person> source = TestData.GetPeople();
     var result = source.Query <Person, IDictionary <string, object> >("SELECT Name, Count(*) FROM this");
 }
Esempio n. 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");
 }