Solved

detecting added rows of in linq

Posted on 2009-04-13
3
253 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now