Table of Contents

Interface IResourceChangeTracker<TResource>

Namespace
JsonApiDotNetCore.Resources
Assembly
JsonApiDotNetCore.dll

Used to determine whether additional changes to a resource (side effects), not specified in a POST or PATCH request, have been applied.

public interface IResourceChangeTracker<in TResource> where TResource : class, IIdentifiable

Type Parameters

TResource

The resource type.

Methods

HasImplicitChanges()

Validates if any exposed resource attributes that were not in the POST or PATCH request have been changed. And validates if the values from the request are stored without modification.

bool HasImplicitChanges()

Returns

bool

true if the attribute values from the POST or PATCH request were the only changes; false, otherwise.

SetFinallyStoredAttributeValues(TResource)

Sets the exposed resource attributes as stored in database, after applying the POST or PATCH operation.

void SetFinallyStoredAttributeValues(TResource resource)

Parameters

resource TResource

SetInitiallyStoredAttributeValues(TResource)

Sets the exposed resource attributes as stored in database, before applying the PATCH operation. For POST operations, this sets exposed resource attributes to their default value.

void SetInitiallyStoredAttributeValues(TResource resource)

Parameters

resource TResource

SetRequestAttributeValues(TResource)

Sets the (subset of) exposed resource attributes from the POST or PATCH request.

void SetRequestAttributeValues(TResource resource)

Parameters

resource TResource