Mindscape
  • Register
  • Login
  • YOUR CART IS EMPTY
home
Software
  • Developers Toolbox
  • LightSpeed
  • Raygun
  • WPF Elements
  • Web Workbench
  • Metro Elements
  • Silverlight Elements
  • NHibernate Designer
  • Phone Elements
  • WPF Diagrams
  • Simple DB management
  • Visual Tools for SharePoint
Downloads
Store
  • Buy online
  • Purchase order
  • Volume discounts
  • Reseller
  • Software license
  • Contact sales
Blog
Support
About
  • About Us
  • Contact
  • Testimonials
rss
twitter
facebook
Implementing Storage Policies with LightSpeed Entity Tracking Soft Deletion Timestamps for Entity Tracking and Soft Deletion User Ids for Entity Tracking and Soft Deletion Concurrent Editing Implementing Policies in HandCoded Entities Change Tracking

Change Tracking

It is sometimes useful to be able to get a list of changes between the originally loaded version of an entity and the in-memory version. For example, this could be used for confirmation or auditing purposes. LightSpeed supports this through the Entity.ChangeTracker property.

Change tracking is not enabled by default because it can add a significant overhead to the size of each entity. To enable change tracking, set ChangeTracker.TrackingMode to ChangeTrackingMode.ChangesOnly. (Only changes made after you have enabled change tracking are recorded.)

To get the list of changes, use the ChangeTracker.Changes property.

Saving Only Changed Fields

Enabling change tracking does not change LightSpeed’s default behaviour of saving all fields. This is because change tracking does not in itself support optimistic concurrency checking.

To save only changed fields you have two options available. Either set Optimistic Concurrency Checking to true in the designer (or create a LockVersion field in your entity), as described under Concurrent Editing above or you can apply the [UnversionedPartialUpdate] attribute to your entity to indicate that only changed fields should be persisted if the values in the database match the original values when the entity was loaded.

Data Products

  • LightSpeed ORM
  • NHibernate Designer
  • SimpleDB Tools
  • SharePoint Tools

DevOp Tools

  • Raygun

Visual Controls

  • WPF Elements
  • WPF Diagrams
  • Silverlight Elements
  • Phone Elements

Popular Products

  • Web Workbench

    Modern web development for Visual Studio!

  • Mindscape Megapack

    All Mindscape products for one awesome price!

Quick Links

  • Forums
  • Blog
  • Register
  • Login
  • Contact us
  • Twitter
  • Facebook
  • Google+
  • YouTube
  • Linkedin
  • Rss

© Mindscape 2025. Mindscape is a registered trademark of Mindscape Limited.

  • Terms
  • Privacy