Linq-To-Sql equivalent for this sql query...

Posted by Pandiya Chendur on Stack Overflow See other posts from Stack Overflow or by Pandiya Chendur
Published on 2010-05-20T10:28:46Z Indexed on 2010/05/20 10:30 UTC
Read the original article Hit count: 288

Filed under:
|
|
|

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...

© Stack Overflow or respective owner

Related posts about linq-to-sql

Related posts about sql-query