Interface IAddToRelationshipService<TResource, TId>
- Namespace
- JsonApiDotNetCore.Services
- Assembly
- JsonApiDotNetCore.dll
[PublicAPI]
public interface IAddToRelationshipService<TResource, in TId> where TResource : class, IIdentifiable<in TId>
Type Parameters
TResource
TId
Methods
AddToToManyRelationshipAsync(TId, string, ISet<IIdentifiable>, CancellationToken)
Handles a JSON:API request to add resources to a to-many relationship.
Task AddToToManyRelationshipAsync(TId leftId, string relationshipName, ISet<IIdentifiable> rightResourceIds, CancellationToken cancellationToken)
Parameters
leftId
TIdIdentifies the left side of the relationship.
relationshipName
stringThe relationship to add resources to.
rightResourceIds
ISet<IIdentifiable>The set of resources to add to the relationship.
cancellationToken
CancellationTokenPropagates notification that request handling should be canceled.