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