title: How convert Sql query to Linq in EF
body: <p>can any one tell me how to write linq query using EF. My sql query is</p>
  
  <pre><code>select * from
      (select tr.Training_id, 
              tr.title,  
              tr.create_on,
              tr.modified_on,
              max(lo.created_on) as lastDate  
      from [trainig] tr
      join [training_video_log] lo 
      on tr.Training_id = lo.fk_trainingvideo_resource_file 
      and lo.fk_user_id = 1050 
      group by tr.Training_id, tr.title, tr.create_on, tr.modified_on) X
  Where modified_on &gt; lastDate
  </code></pre>