How can I add an “IsDirty” property to a LINQ to SQL entity?
问题 I am binding my entities to an edit form in WPF. Within a DataTemplate, I want to be able to set the background color of the root container within a DataTemplate to show it has been changed and these changes have not yet been submitted to the database. Here's a very simple sample that demonstrates what I'm talking about (forgive errors): <Page ...> <Page.DataContext> <vm:MyPageViewModel /> <!-- Holds reference to the DataContext --> </Page.DataContext> <ItemsControl ItemsSource = {Binding