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
TIdIdentifies the left side of the relationship.
relationshipName
stringThe relationship for which to perform a complete replacement.
rightValue
objectThe resource or set of resources to assign to the relationship.
cancellationToken
CancellationTokenPropagates notification that request handling should be canceled.