Describe the bug
Error item in AseErrorCollection is not the same order as the legacy driver
To Reproduce
If you got a stored proc that after it got call produces the following errors (both custom and generic)
[1] RecordNotFound (Severity:16) => A customer could not be found
[2] RecordNotFound (Severity:16) => A customer could not be found
[3] AseException (Severity:16) => Attempt to insert NULL value into column 'xyz'
[4] AseException (Severity:10) => Command has been aborted.
The current behavior sort the error with greater severity on top which is right but it doesn't respect ones that have the same severity level. So the above list returned as follow which is not consistence with the legacy driver
[3] AseException (Severity:16) => Attempt to insert NULL value into column 'xyz'
[2] RecordNotFound (Severity:16) => A customer could not be found
[1] RecordNotFound (Severity:16) => A customer could not be found
[4] AseException (Severity:10) => Command has been aborted.
Expected behavior
If the level of severity is the same and already in the right order like in this case then we shouldn't have to swap them
[1] RecordNotFound (Severity:16) => A customer could not be found
[2] RecordNotFound (Severity:16) => A customer could not be found
[3] AseException (Severity:16) => Attempt to insert NULL value into column 'xyz'
[4] AseException (Severity:10) => Command has been aborted.
Environment
.NET Framework 4.6.2
AdoNetCore.AseClient nuget package version 0.18.0
Additional context
Line 68 in the GetIndexOfMostSevereError method of the AseErrorCollection.cs class the compare operator should be a < (less than) and not a <= (less than or equal to)
Describe the bug Error item in AseErrorCollection is not the same order as the legacy driver
To Reproduce If you got a stored proc that after it got call produces the following errors (both custom and generic) [1] RecordNotFound (Severity:16) => A customer could not be found [2] RecordNotFound (Severity:16) => A customer could not be found [3] AseException (Severity:16) => Attempt to insert NULL value into column 'xyz' [4] AseException (Severity:10) => Command has been aborted.
The current behavior sort the error with greater severity on top which is right but it doesn't respect ones that have the same severity level. So the above list returned as follow which is not consistence with the legacy driver [3] AseException (Severity:16) => Attempt to insert NULL value into column 'xyz' [2] RecordNotFound (Severity:16) => A customer could not be found [1] RecordNotFound (Severity:16) => A customer could not be found [4] AseException (Severity:10) => Command has been aborted.
Expected behavior If the level of severity is the same and already in the right order like in this case then we shouldn't have to swap them [1] RecordNotFound (Severity:16) => A customer could not be found [2] RecordNotFound (Severity:16) => A customer could not be found [3] AseException (Severity:16) => Attempt to insert NULL value into column 'xyz' [4] AseException (Severity:10) => Command has been aborted.
Environment
Additional context Line 68 in the GetIndexOfMostSevereError method of the AseErrorCollection.cs class the compare operator should be a < (less than) and not a <= (less than or equal to)