Skip to content

Version 2.5.4

Compare
Choose a tag to compare
@tonysneed tonysneed released this 05 Feb 11:30

This release resolves the following issues / pull requests:

  • #105: ITrackableExtended interface
    • Create an ITrackableExtended<TProperty> interface in a PCL called TrackableEntities.Common.Extended, which references TrackableEntities.Common. The interface should inherit from ITrackable but add a TrackgingStateExtended property of type <TPropertyType>.
    • The purpose of this interface is to allow for extra metadata for change-tracking.
  • #106: DbContext.ApplyChanges overload accepting lambda
    • This was resolved by adding a state interception feature allowing callers to use a fluent API for adding interceptors which instruct DbContext.ApplyChanges on how to set entity state.
    • This feature was implemented by the following PR's: #114, #115, #117, #118.
    • Here is an example of using a StateChangeInterceptor to override the default behavior of ApplyChanges by setting entity state to Unchanged instead of Modified.
product.TrackingState = TrackingState.Modified;
context.WithStateChangeInterceptor<Product>((e, r) => EntityState.Unchanged)
    .ApplyChanges(product); // Product is marked as Unchanged instead of Modified