Click here to Skip to main content
       

LINQ

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
QuestionGroup By (another question)memberCollin Jasnoch15 Jul '10 - 5:42 
QuestionLINQ -- Primary Key , Foriegn Key Association Is very confusing in Many -ti-many relationships ..groupasp_victim11 Jul '10 - 0:16 
AnswerRe: LINQ -- Primary Key , Foriegn Key Association Is very confusing in Many -ti-many relationships ..mvpMark Nischalke11 Jul '10 - 3:23 
QuestionLinq - how to write code for this querymemberimak2 Jul '10 - 5:47 
AnswerRe: Linq - how to write code for this querymemberSyed Mehroz Alam2 Jul '10 - 9:28 
GeneralRe: Linq - how to write code for this querymemberimak5 Jul '10 - 7:28 
GeneralRe: Linq - how to write code for this querymemberSyed Mehroz Alam5 Jul '10 - 23:39 
This should do the trick:
 
var query = from row in dt.AsEnumerable()
     where row.Field<string>("MinValue") != null && row.Field<string>("MaxValue") != null
     group row by row.Field<string>("Name") into grp
     let maxServiceDate = grp.Max(r => r.Field<DateTime>("ServiceData")) 
 
     from row in grp
     where row.Field<string;>("ServiceData") == maxServiceDate 
     select row
Syed Mehroz Alam
My Blog | My Articles

Computers are incredibly fast, accurate, and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination. - Albert Einstein

QuestionHow to convert a field in a LINQ querymemberHardus Lombaard1 Jul '10 - 23:48 
AnswerRe: How to convert a field in a LINQ querymemberSyed Mehroz Alam2 Jul '10 - 9:32 
GeneralRe: How to convert a field in a LINQ querymemberBechBej4 Jul '10 - 12:01 
Questionrefresh contextmemberkasraa0009800023 Jun '10 - 21:25 
AnswerRe: refresh contextmemberStoffy197225 Jul '10 - 9:04 
QuestionLINQ Scope QuestionmemberHypermommy19 Jun '10 - 4:06 
AnswerRe: LINQ Scope QuestionmemberHypermommy19 Jun '10 - 13:06 
QuestionExecute LINQ query on list with unknown elements typememberm_n_r15 Jun '10 - 10:10 
QuestionLinq Insertmemberspankyleo12315 Jun '10 - 1:07 
AnswerRe: Linq Insertmvp d@nish 15 Jun '10 - 1:11 
GeneralRe: Linq Insertmemberspankyleo12315 Jun '10 - 1:13 
GeneralRe: Linq Insertmvp d@nish 15 Jun '10 - 1:18 
GeneralRe: Linq Insertmemberspankyleo12315 Jun '10 - 1:24 
GeneralRe: Linq Insertmvp d@nish 15 Jun '10 - 1:33 
GeneralRe: Linq Insertmemberspankyleo12315 Jun '10 - 2:01 
GeneralRe: Linq InsertmemberPavel Yermalovich7 Jul '10 - 20:43 
QuestionLinqToSQL unit test in .NET errormemberSteve Holdorf12 Jun '10 - 9:33 
AnswerRe: LinqToSQL unit test in .NET errormemberSteve Holdorf14 Jun '10 - 1:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 3 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid