Help with a algorithm in linq to resolve a query
- by Deumber
I have been some time thinking how to resolve this problem, but out of ideas i prefer expose it for help.
I have 2 tables (linq to sql) A and B, A have a many relation with B, so A have a property EntitySet of B
A have the following properties:
CreateDate (Datetime)
ModificateDate (Datetime)
Bs (EntitySet<B>)
B have the following properties:
CreateDate (Datetime)
ModificateDate (Datetime)
All that i want is return a ordered collection of A by the Max date between :
A.CreateDate,
A.ModificateDate,
The Max B.CreateDate of all B in A
The Max B.ModificateDate of all B in A
if i someone need a little example, just ask for it.