It throws this exception:-
SD.LLBLGen.Pro.ORMSupportClasses.ORMQueryExecutionException
HResult=0x80131600
Message=An exception was caught during the execution of a retrieval query: Invalid column name 'ExF'.. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception.
Source=SD.LLBLGen.Pro.ORMSupportClasses
StackTrace:
at SD.LLBLGen.Pro.ORMSupportClasses.RetrievalQuery.Execute(CommandBehavior behavior)
at SmartLibrarian.DAL.DatabaseSpecific.DataAccessAdapter.FetchDataReader(IRetrievalQuery queryToExecute, CommandBehavior readerBehaviour) in F:\src\SmartLibrarian\SmartLibrarian.DAL\Custom\DataAccessAdapter.cs:line 540
Inner Exception 1:
SqlException: Invalid column name 'ExF'.
The SQL output was
SELECT
[StockCheck].[ID],
[StockCheck].[Description],
[StockCheck].[StartDateTime],
[StockCheck].[TotalCount],
[StockCheck].[SeenCount],
[StockCheck].[LastSeenDateTime],
[StockCheck].[CompletionDateTime],
[StockCheck].[CompletionSummary],
[StockCheck].[RemovedCount]
FROM
[StockCheck]
ORDER BY
[ExF] ASC,
[StockCheck].[CompletionDateTime] DESC,
[StockCheck].[StartDateTime] DESC
I think the | operator should maybe call SortClauseProducers.CreateSortClause because that deals with EmitAliasForExpressionAggregateField and the Ascending() doesn't?
Daelmo: I now see the property you meant! it was "SetEmitAliasForExpressionAggregateField()" I couldn't find.