Table of Contents

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 TId

Identifies the left side of the relationship.

relationshipName string

The relationship to add resources to.

rightResourceIds ISet<IIdentifiable>

The set of resources to add to the relationship.

cancellationToken CancellationToken

Propagates notification that request handling should be canceled.

Returns

Task