Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit e385f3e

Browse files
committed
Fixed a couple of comments
1 parent a3413d8 commit e385f3e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ServiceStack.OrmLite/Expressions/SqlExpression.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ public virtual SqlExpression<T> GroupBy<TKey>(Expression<Func<T, TKey>> keySelec
463463
useFieldName = true;
464464

465465
var groupByKey = Visit(keySelector);
466-
StripAliases(groupByKey as SelectList); // No "AS ColumnAlias" in GROUP BY, just the column names
466+
StripAliases(groupByKey as SelectList); // No "AS ColumnAlias" in GROUP BY, just the column names/expressions
467467

468468
return GroupBy(groupByKey.ToString());
469469
}

tests/ServiceStack.OrmLite.Tests/Expression/SqlExpressionTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public void Can_select_Dictionary_with_SqlExpression()
8383
var map = db.Dictionary<string, int>(query);
8484
Assert.That(map.EquivalentTo(expected));
8585

86-
// Same, but group by an anonymous type using an alias -t his should not translate to "GROUP BY TheLetter AS Letter", which is invalid SQL
86+
// Same, but group by an anonymous type using an alias - this should not translate to "GROUP BY TheLetter AS Letter", which is invalid SQL
8787

8888
query = db.From<LetterFrequency>()
8989
.Select(x => new { x.Letter, count = Sql.Count("*") })

0 commit comments

Comments
 (0)