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 to delete Records from database thro' LINQ

how to delete Records from database thro' LINQ

Scheduled Pinned Locked Moved LINQ
csharpasp-netdatabaselinqdesign
2 Posts 2 Posters 0 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.
  • V Offline
    V Offline
    varshavmane
    wrote on last edited by
    #1

    Hello all, I want insert/update records in four different tables. First table has ID and Name columns, this ID is FK in other 3 tables. What I want is whenever user edit the data for ID = 1, then I have to update all the four table but the problem is that if intially 2nd, 3rd and 4th table has 3 records each whenever user remove one the data from the UI and add 2 new data then I want to delete the record which user has removed from UI and add 2 new records in the tables and so all the 3 tables has 2 old and 2 new records that is in all 4 records in all the table and onr record in 1st table. Can someone please tell me how to do this in Linq. I am using ASP.NET(C#) with Silverlight. Thanks in advance.

    A 1 Reply Last reply
    0
    • V varshavmane

      Hello all, I want insert/update records in four different tables. First table has ID and Name columns, this ID is FK in other 3 tables. What I want is whenever user edit the data for ID = 1, then I have to update all the four table but the problem is that if intially 2nd, 3rd and 4th table has 3 records each whenever user remove one the data from the UI and add 2 new data then I want to delete the record which user has removed from UI and add 2 new records in the tables and so all the 3 tables has 2 old and 2 new records that is in all 4 records in all the table and onr record in 1st table. Can someone please tell me how to do this in Linq. I am using ASP.NET(C#) with Silverlight. Thanks in advance.

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      why not you use LINQ To SQL to do this. use this http://weblogs.asp.net/scottgu/archive/2007/05/19/using-linq-to-sql-part-1.aspx article.

      Abhishek Sur My Latest Articles Basics on LINQ and Lambda Expressions
      Create .NET Templates

      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