Solved

detecting added rows of in linq

Posted on 2009-04-13
3
257 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

749 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