This topic is may be dublicated. I asked in a different scenario under this topic and it is answered by Derviş Kayımbaşıoğlu. When I edited my topic like this and asked again, Derviş Kayımbaşıoğlu said I should ask this in a new topic. So I had to ask the question in a new topic.
Here is data schema example:
I have a list getting from the SQLite database like this:
var decisions = _db.decisions.Where(x => x.CAT_ID == Cat.Id).ToList();
If the values of the REC_ID field in this list are the same, I would like to output these records in foreach loops and remaining records to a separate foreach loop. For example in the list above, REC_ID 13 ones are a in a loop, REC_ID 5 ones are a in a loop, REC_ID 7 ones are a in a loop and the others are in a last loop.
Edit from comment:
I want to separate those with more than one same value and the remainder.In our example, IDs' {1, 2, 3} {4, 5} {6, 7} and {8, 9} should be seperated.
