I thus far used concatenated Id string like 1,2,3 and updated in my table using this query…
if exists( select ClientId from Clients where ClientId IN (SELECT i.items FROM dbo.Splitfn(@Id,',') AS i))
begin
update Clients set IsDeleted=1 where ClientId IN (SELECT i.items FROM dbo.Splitfn(@Id,',') AS i)
select 'deleted' as message
end
What is the linq-to-sql equivalent for the above query? Any suggestion…
If I’ve understood what you’re trying to do correctly, something like this should work.