0

Not sure if the question is correct, as I'm having some trouble with what the term is for what I'm looking for exactly. Have the following data:

int? Sequence
Date theDate
int? anID

What I need to do is apply the following rules to this sequence (LINQ):

  • no 2 elements which have a Sequence have the same non-null anIDs.
  • no 2 elements have the same theDate and anIDs if one of them has a Sequence.
  • element N’s theDate is more recent than element N-1s theDate.
  • element N’s theDate = element N-1s theDate AND element N's Sequence > element N-1's Sequence.

How do I manage this? Do I need to use nested group by's? Will this be conditional group by's?

Am a little lost on my implementation and terminology and will update question if I get a better understanding of the solution.

4

0 回答 0