Hello!
I use linq2sql and m_DateContext.Dates class for table
ID | ParentID | Datestamp
---|----------|----------
1 | NULL | 1.8.2010
---|----------|----------
2 | 1 | 2.8.2010
---|----------|----------
3 | 1 | 4.8.2010
etc...
I need to write the linq query to select only rows where ParentID is NULL (ex: ID=1), BUT Value of DATESTAMP must be equals to max date from it's child rows. (Row ID=3).
Linq query must return an instance of m_DateContext.Dates with non-broken links to entities in database schema.
Result must be smthng like:
ID = 1 ParentID=NULL Datestamp = 4.8.2010
Please help