Hi All The following SQL syntax retrieves the correct record in my database: select top 1 max ( createddate ), documentpath from App_UsersDocuments where DocumentTypeID = 1 and userid=@userid group by documentpath but i am struggling to translate this into linq. I have the following code: Dim dd = ( From d In db.App_UsersDocuments Where d.UserID = userid And d.DocumentTypeID = documenttypeid Select d).ToList Return dd but dont know the correct syntax to get the most recent document as specified by
Read More...