Table of Contents

Interface ISetRelationshipService<TResource, TId>

Namespace
JsonApiDotNetCore.Services
Assembly
JsonApiDotNetCore.dll
public interface ISetRelationshipService<TResource, in TId> where TResource : class, IIdentifiable<in TId>

Type Parameters

TResource
TId

Methods

SetRelationshipAsync(TId, string, object?, CancellationToken)

Handles a JSON:API request to perform a complete replacement of a relationship on an existing resource.

Task SetRelationshipAsync(TId leftId, string relationshipName, object? rightValue, CancellationToken cancellationToken)

Parameters

leftId TId

Identifies the left side of the relationship.

relationshipName string

The relationship for which to perform a complete replacement.

rightValue object

The resource or set of resources to assign to the relationship.

cancellationToken CancellationToken

Propagates notification that request handling should be canceled.

Returns

Task