I dont really understand about linq, can you help me with this query?
SELECT *
FROM attachment
WHERE create_date IN ( SELECT MAX (create_date)
FROM attachment
GROUP BY document_id, attachment_type)
how can I change it to linq statement. I’m using DataTable.
sorry, I have DataTable that have field attachment_id, document_id, attachment_type and create_date. And I really can’t use dt.Select() 🙁
and also I need to change it back to DataTable or Datarow
Although your question is not really clear, i assume that this is what you’re looking for:
Here’s sample code to test the above: