Delete multiple records with Linq

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Arjen

    Delete multiple records with Linq

    Hi,

    How can I delete multiple records with Linq?

    On the internet I found the DeleteAll function, but this one does not exist
    in my library.

    Please help me out.

    Thanks!

  • =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?=

    #2
    RE: Delete multiple records with Linq

    Scott Guthrie has this on his blog post introducing linq to sql. Its about
    half way down although the whole post is a good talk through the updating the
    database part of linq.
    Have a look here:



    --
    Ciaran O''Donnell
    try{ Life(); } catch (TooDifficultException) { throw Toys(); }



    "Arjen" wrote:
    Hi,
    >
    How can I delete multiple records with Linq?
    >
    On the internet I found the DeleteAll function, but this one does not exist
    in my library.
    >
    Please help me out.
    >
    Thanks!
    >
    >

    Comment

    • Chakravarthy

      #3
      Re: Delete multiple records with Linq

      Dude,

      First things first. as the abbreviation of LINQ is Language INtegrated
      QUERY. which is majorly targeted for QUERYing, but not for all the CRUD
      operations.

      secondly, as mentioned in SCOTT's blog, you have to narrow done to that
      SINGLE record using expression, then use the DELETEALL ..

      HTH



      "Arjen" <boah123@hotmai l.comwrote in message
      news:DA8B2E43-156A-4B4A-A8AF-4309688E4F4B@mi crosoft.com...
      Hi,
      >
      How can I delete multiple records with Linq?
      >
      On the internet I found the DeleteAll function, but this one does not
      exist in my library.
      >
      Please help me out.
      >
      Thanks!

      Comment

      Working...