Sandeep Kumar

Sandeep Kumar

  • 1.1k
  • 684
  • 61.7k

how to write linq query of the below sql query

Feb 11 2023 7:04 AM

Declare @FacultyName Nvarchar(100)
 SELECT C.ContentTypeId,C.Id,V.VersionId,V.VersionName,C.CourseName,C.DeptName,V.ContentId,V.VersionNote
FROM  [dbo].[ContentDetails] C inner join [dbo].[VersionDetails] V on C.Id=V.ContentId  where V.VersionId in (
select Max(V.VersionId)
  FROM [dbo].[ContentDetails] C inner join [dbo].[VersionDetails] V on C.Id=V.ContentId  where c.FacultyName like @FacultyName
group by V.ContentId 

) order by  V.VersionId desc
 


Answers (6)