Interface ISetRelationshipService<TResource, TId>
- Namespace
- JsonApiDotNetCore.Services
- Assembly
- JsonApiDotNetCore.dll
public interface ISetRelationshipService<TResource, in TId> where TResource : class, IIdentifiable<in TId>
Type Parameters
TResourceTId
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
leftIdTIdIdentifies the left side of the relationship.
relationshipNamestringThe relationship for which to perform a complete replacement.
rightValueobjectThe resource or set of resources to assign to the relationship.
cancellationTokenCancellationTokenPropagates notification that request handling should be canceled.