Version 2.5.4
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 fromITrackable
but add aTrackgingStateExtended
property of type<TPropertyType>
. - The purpose of this interface is to allow for extra metadata for change-tracking.
- Create an
- #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 ofApplyChanges
by setting entity state toUnchanged
instead ofModified
.
- This was resolved by adding a state interception feature allowing callers to use a fluent API for adding interceptors which instruct
product.TrackingState = TrackingState.Modified;
context.WithStateChangeInterceptor<Product>((e, r) => EntityState.Unchanged)
.ApplyChanges(product); // Product is marked as Unchanged instead of Modified