Get record counts of records which has not yet been persisted RRS feed

  • Question

  • I have started to write a WPF CRUD application using LinqToSQL Classes. Next to my Save button I would like to have a count of all the changes that has not yet been persisted to the database. I am using the DataContext.SubmitChanges() method to save the changes.
    I am using ColectionViews for the plumbing between the XAML and the code behind.

    It would be very nice for the user to see for example that there are 5 NEW records, 2 CHANGED records and 1 DELETED record so that they know they have to click on the Save button to persist these.

    I can manually keep a counter and increase it each time the user clicks on the NEW or DELETE button or when they make changes, but it would be a lot more elegant if one could get this information from the DAL.

    Any help on this would be greatly appreciated.
    Thursday, June 4, 2009 8:39 AM