Solved

detecting added rows of in linq

Posted on 2009-04-13
3
255 Views
Last Modified: 2013-11-11
in a datatable I have kind of row status (new, added ,deleted..), this is whether the datatable is filled by an adapter of a stored procedure or a table. now in linq with a list filled by a stored procedrue, how to track the deleted/added/modified rows?
0
Comment
Question by:TheSilverBullet
3 Comments
 
LVL 9

Expert Comment

by:Sreedhar Vengala
ID: 24133541
would this be helpful : LINQ Audit   - DoddleAudit : http://www.matthidinger.com/archive/2009/01/12/linq-audit-trail-v2.aspx
0
 

Author Comment

by:TheSilverBullet
ID: 24148108
that sounds good, but it has limitations, as the tables should use auto increment pk, and only on pk for a table!
0
 
LVL 11

Accepted Solution

by:
anyoneis earned 370 total points
ID: 24180520
TSB: The DataContext has a GetChangeSet() method which returns a ChangeSet. In there you will find properties for Inserts, Updates, and Deletes.

David
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question