Sandeep Kumar

Sandeep Kumar

  • 1.1k
  • 683
  • 60.5k

how to generate row number for this query in linq

Feb 17 2023 6:54 AM

SELECT  Row_Number() over (order by Id desc) SrlNo,* 
  FROM [TU_LMS].[dbo].[ContentDetails] where DeptId=28 and createdBy=6
  union 
  SELECT  Row_Number() over (order by Id desc) SrlNo ,* 
  FROM [TU_LMS].[dbo].[ContentDetails] where DeptId=28 and createdBy !=6 


Answers (10)