Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. LINQ
  4. how can write linq insert ,update,delete queries

how can write linq insert ,update,delete queries

Scheduled Pinned Locked Moved LINQ
csharplinqannouncement
3 Posts 3 Posters 24 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dipen mistry
    wrote on last edited by
    #1

    how can write linq insert ,update,delete queries

    A H 2 Replies Last reply
    0
    • D dipen mistry

      how can write linq insert ,update,delete queries

      A Offline
      A Offline
      Andy_L_J
      wrote on last edited by
      #2

      Where have you looked, there are lots of examples.... here is one[^]

      I don't speak Idiot - please talk slowly and clearly 'This space for rent' Driven to the arms of Heineken by the wife

      1 Reply Last reply
      0
      • D dipen mistry

        how can write linq insert ,update,delete queries

        H Offline
        H Offline
        Hailu Worku Obsse
        wrote on last edited by
        #3

        To Insert new record: bool InsertNewProduct(Product p) { myDataContext dt= new myDataContext(); dt.Products.InsertOnSubmit(p); dt.SubmitCHanges(); return true; } To Insert new record: bool DeleteProduct(Product p) { myDataContext dt= new myDataContext(); dt.Products.DeleteOnSubmit(p); dt.SubmitCHanges(); return true }

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups