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

Commit a2261b9

Browse files
committed
small code refactor
1 parent e597cab commit a2261b9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ServiceStack.OrmLite/JoinSqlBuilder.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,11 @@ private void ProcessNew(string tableName, NewExpression nex, List<string> lst, b
9090
if (nex.Arguments == null || nex.Arguments.Count == 0)
9191
throw new Exception("Only column list allowed");
9292

93+
var expressionProperties = nex.Type.GetProperties();
9394
for (int i=0; i< nex.Arguments.Count;i++)
9495
{
9596
var arg = nex.Arguments[i];
96-
var alias = nex.Type.GetProperties()[i].Name;
97+
var alias = expressionProperties[i].Name;
9798

9899
PropertyList(tableName, arg, lst, withTablePrefix, alias);
99100
}

0 commit comments

Comments
 (0)