linq query to return object with parameter
Posted on 2010-09-03
linq query to get highest id with datetime query
I need a linq query that returns a QuestionAnswer object with the datetimevalue given the previousAttemptID
Here is database table called "QuestionAnswers"
So something like
QuestionAnswer = db.QuestionAnswers.Where(r => r.previousAttemptID == previousAttemptID) // then get the record with the max datetime stampe (field dateAnswered)