Here is a SQL query that I am trying to convert in to Linq. I am using a generic list of objects and not a DataTable if that is relevant.
Select Max(Date), ID, Property1, Peroperty2 From List Group By ID
Please help.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Though your SQL is not valid as
Property1andProperty2must be part of your aggregates, this will group by ID, Property1, then Property2 in that order which is what I believe you are looking for:which is equivalent to :