I am creating a report in which i am creating a stored procedure , in that for one particular column I need to use following query
(SELECT COUNT(1) FROM [dbo].EmployeeDependent WITH (NOLOCK)
WHERE [dbo].EmployeeDependent.GCPDocumentId = gdh.GCPDocumentId )
AS [No of Dependants travelling with employee] FROM tablename
and this whole subquery is used in the select clause of sql query. Now I want to convert this query to linq , but somehow i am not able to make it.
Thanks
EmployeeDependent.GCPDocumentId = + gdh.GCPDocumentIdwhat does this line mean?[No of Dependants travelling with employee]am i rit?EmployeeDependent.Where(x => x.GCPDocumentId == gdh.GCPDocumentId).Count();If this is a subquery, you need to include the value into parent query.