Hi folks,
i'm got a simple IEnumerable<foo> foos;
This collection are some results from a db call.
I wish to make sure that each item in the list is ordered correctly. The Db either returns the results by
- ordered by id, lowest to highest. eg. 1, 2, 3, 4,. ... etc.
- ordered by date created, decrement (most recent, first).
Can this be done with a quick linq statement .. to check for this?
eg. Assert.IsTrue(.. insert linq statement here .. )
currently, i've got a for loop and remember the previous entry and check if the value of that, if there was a value. This feels ... cumbersome.
Any ideas?