change-tracking

INotifyPropertyChanging and validations: when do I raise PropertyChanging?

INotifyPropertyChanged is fairly self explanatory and I think I'm clear on when to raise that one (i.e. when I've finished updating the values). If I implement INotifyPropertyChanging I'm tending to raise the event as soon as I enter the setter or other method that changes the objects state and then continue with any guards and validatio...

How to implement "get latests changed items" with ADO.NET Data Services?

Hi Lets say I have a lists of entities (for example, a list of TODO items) that more than one user can change, delete from and add to at the same time. So to maintane a synchronized listed between all the clients, I want each client (AJAX based) to ask for changes every xx seconds. Since the list can get veeery long, I do not want to d...

MySQL database change tracking

Hi! What tools are you using to track changes in your MySQL database? Currently I'm in a project where we use a plain text-file (version controlled via SVN) in which we manually add SQL statements when making changes to the database.Many of the changes magically disappears every now and then, and we are now looking for a better way to c...

Using NHibernate to determine which fields have been updated (for validation purposes) before persisting

Prior to persisting updates to my business entities, I need to perform validation checks to determine which properties have been changed. For example, certain fields can only be updated when the "Status" property has a particular value. E.g. when an Order entity has a Status of finalized, only the notes (string) field can be updated. ...

Does SQL 2008 Express supports Change Tracking

Hi Due to the lack of documentation for this on MSDN, I am forced to ask here. Does the Express version support the same Change Tracking Feature(s) as the other editions does? Thanks leppie ...

ADO.NET Framework change tracking

Hi, i just wanted to ask if there is a way the reject all changes made to a ADO.NET Framework model with its relations? Auditing in Entity Framework describes a way the restore the original value of a single entity. But is this possible for all unsaved changes in the whole database? ...

How can I do generic field and component-level change tracking in NHibernate?

In my application, I've got a few different types of entities that I have a requirement to do field-level change tracking on. I've googled for this and only can come up with examples on doing simple "Date Inserted" and "Date Updated" audit tracking where you just modify fields on the entity being persisted already. My requirements are mo...

Preserving old data changed by user

I have a users table that has the following fields: userid, phone, and address. Since this is user data, I'm letting the user change them whenever he wants. Problem is I'd like to keep track of those changes and preserve the old data too. Here's some of the ideas I considered: appending the new data to the old data and using a separato...

Business objects synchronization between WCF services

Hi everyone ! I am moving my architecture from coupled one to SOA (WCF) loosely coupled. I have several services which communicate with each others. How would you synchronize the business instances between the services? I see two scenarios here: All the business objects are created in only one service, let's call it MainService and ...

Will creating a nonclustered index break change tracking on my database (SQL Server 2008)?

I have been investigating some performance issues with my database (SQL Server 2008). SQL Management studio suggested that I use this code to add a nonclustered index which will decrease processing time by over 90%. USE [DatabaseName] GO CREATE NONCLUSTERED INDEX [<Name of Missing Index, sysname,>] ON [dbo].[tblAnswers] ([QuestionID]) ...

Linq to SQL: Ammend command before submission to database

Is there a hook somewhere within Linq to SQL that would allow me to manually modify a command before it is sent to the database? Specifically, I am trying to introduce the WITH CHANGE_TRACKING_CONTEXT(@contextData) syntax whenever an insert/update/delete is applied to the database in order to be able to add additional information agains...

What is the best way to transparently log changes to objects when using LINQ-to-SQL?

I keep track of all changes that are made to objects so that the user can view and rollback to any previous version of any item in the database. The history database table looks like this: Item | ItemId | Field | WhenChanged | OldValue | NewValue customer | 6 | LastName | 2009-12-31 13:00:04 | Sanders | Sanders-...

What is the best architecture for tracking field changes on objects?

We have a web application that is built on top of a SQL database. Several different types of objects can have comments added to them, and some of these objects need field-level tracking, similar to how field changes are tracked on most issue-tracking systems (such as status, assignment, priority). We'd like to show who the change is by,...

SQL Server 2008 Change Tracking

We want to use Change Tracking to implement a two-way sync between a SQL Server 2008 Enterprise/Standard instance, and an Express 2008 instance. When we read the remote changes, and then make the adjustments on the local server, how can we keep those statements from being change tracked? I foresee endless loops of one server tracking a...

Overriding entity caching/change-tracking behaviour in Linq to SQL

I think that perhaps the original question was too long-winded with too many unnecessary details, so this is my attempt to simplify. I am looking for a means to perform any of the actions below. I only need to do one, not all. If anyone knows the answer to even one of these, please respond. So, is it possible to do any of the followi...

Entitity Framework: Change tracking in SOA with POCO approach

In our layered application, we are accessing database via WCF calls. We are creating and disposing contexts per request. Also we are using POCO approach. My question is, in pure POCO model (completely persistent ignorant POCOs) is it possible to track the changes, while we are creating and disposing context per request (as previous conte...

Advice on Change Tracking in Sql Server 2008

My client is looking for a way to do a full audit trails (full view of historical data on all tables) on the application. Other than using the old fashioned way of having table copies or storing field name, field value, modified by, modified on etc, I was looking at using Sql Server 2008 change tracking. Found a How-To article on msdn ...

What's the best practice for setting last modified and who modified using NHibernate?

In my application I have a situation where we need to capture the when a record was created and modified and what user performed those actions. So I might have an object something like: public class Product { int Id; int Name; DateTime CreatedOn; int CreatedByUserId; DateTime LastModifiedOn; int LastModifiedByUserId; } W...

Syncing with and without Sql Server 2008 changes tracking

I've stuck with syncing a Sql server 2008 having changes tracking enabled with a 2005 one that doesn't have this mechanism. Would you please point me a right track, how can I handle this. Thank you, ...

Tracking changed (unsaved) objects

I have a class which is serialized to and from an XML file when the user decided to open or save. I'm trying to add the typical functionality where when they try to close the form with un-saved changes the form warns them and gives them the option of saving before closing. I've added a HasUnsavedChanges property to my class, which my fo...