G
G
getfield2021-07-22 12:55:32
LINQ
getfield, 2021-07-22 12:55:32

Can a DB send data in a different order?

There is an application. Upon request via the API, the application receives records from the database filtered by date. Then it sorts by date (NOT unique property), cuts off the first 100 and all this through LINQ IQueryable. At the end, it generates a response with the final collection List.
There is my application. I do everything the same, the same sorter, working with the database also through IQueryable, I return a List, but in the end I get collections with a different order of elements.
If the sorters are the same, then the same input data will be in the same order after sorting. If the totals are different, then the input collections are different. So the DB sends the items in a different order?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stalker_RED, 2021-07-22
@getfield

If you do not specify a sort, then the order is not guaranteed.
Set two fields for sorting, type order by date, idand will be normal.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question