Skip to content

Commit

Permalink
changing ExpressionPrinter for make TryReadValue more terse
Browse files Browse the repository at this point in the history
  • Loading branch information
maumar committed Nov 23, 2016
1 parent 1a47fe6 commit bffc973
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,8 @@ protected override Expression VisitMethodCall(MethodCallExpression node)
{
var simpleMethods = new List<string>
{
"get_Item"
"get_Item",
"TryReadValue"
};

switch (node.Method.Name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,26 +131,10 @@ ORDER BY [o].[CustomerID]
materializer: (ValueBuffer valueBuffer) =>
{
var3 = new Order()
var3.<OrderID>k__BackingField = int TryReadValue(
valueBuffer: valueBuffer,
index: 0,
property: OrderID
)
var3.<CustomerID>k__BackingField = string TryReadValue(
valueBuffer: valueBuffer,
index: 1,
property: CustomerID
)
var3.<EmployeeID>k__BackingField = Nullable<int> TryReadValue(
valueBuffer: valueBuffer,
index: 2,
property: EmployeeID
)
var3.<OrderDate>k__BackingField = Nullable<DateTime> TryReadValue(
valueBuffer: valueBuffer,
index: 3,
property: OrderDate
)
var3.<OrderID>k__BackingField = int TryReadValue(valueBuffer, 0, OrderID)
var3.<CustomerID>k__BackingField = string TryReadValue(valueBuffer, 1, CustomerID)
var3.<EmployeeID>k__BackingField = Nullable<int> TryReadValue(valueBuffer, 2, EmployeeID)
var3.<OrderDate>k__BackingField = Nullable<DateTime> TryReadValue(valueBuffer, 3, OrderDate)
return instance
}
)
Expand All @@ -161,7 +145,7 @@ ORDER BY [o].[CustomerID]
TestSqlLoggerFactory.Log.Replace(Environment.NewLine, FileLineEnding));
}
}

private readonly NorthwindQuerySqlServerFixture _fixture;

public QueryLoggingSqlServerTest(NorthwindQuerySqlServerFixture fixture)
Expand Down

0 comments on commit bffc973

Please sign in to comment.