Closed bugproof closed 5 years ago
The ordering is there - in argument.Ordinal - but not applied in the model. In some places (SqlGen) it's ordered by using the ordinal, but it should be done directly in the model. Fix coming soon.
Released in 2.7.2
Just took a quick look and
ORDER BY
is the cause (seems to be similar in all implementations): https://github.com/martinjw/dbschemareader/blob/1612b7242f8989ce29f046fbb174a8738210eb33/DatabaseSchemaReader/ProviderSchemaReaders/Databases/SqlServer/ProcedureArguments.cs#L47I think it would be better to remove it or order by ORDINAL_POSITION. But still it can be solved like:
storedProcedure.Arguments.OrderBy(arg => arg.Ordinal)
The question is: wouldn't it be better if it was ordered by ordinal by default?