Я не совсем уверен, пытаюсь ли я сделать что-то слишком сложное для этого, но то, что я по сути хочу сделать, это перевернуть это:
declare @callid int
set @callid = 57
declare @update nvarchar(max)
declare update_cursor cursor for
select UpdateIdentity from [Helpdesk_HR].[dbo].[hdEvents]
where CallID = @callid group by UpdateIdentity order by UpdateIdentity
open update_cursor
fetch next from update_cursor
into @update
while @@FETCH_STATUS = 0
begin
select *
from [Helpdesk_HR].[dbo].[hdEvents]
where UpdateIdentity = @update
fetch next from update_cursor
into @update
end
close update_cursor
deallocate update_cursor
в эквивалент LINQ. Может кто-нибудь сказать мне, если это вообще возможно с LINQ? если да как?
Заранее спасибо.