LINQ in Action roller

how to get the max date

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...
Published Tuesday, July 08, 2008 12:11 AM by MSDN Forums: LINQ Project General
Anonymous comments are disabled

Featured Item

This Blog

Sponsoring

Syndication