Table of Contents

Class RelationshipDataAdapter

Namespace
JsonApiDotNetCore.Serialization.Request.Adapters
Assembly
JsonApiDotNetCore.dll

Validates and converts the data from a relationship. It appears in a relationship request, in the relationships of a POST/PATCH resource request, in an entry of an atomic:operations request that targets a relationship and in the relationships of an operations entry that creates or updates a resource.

public sealed class RelationshipDataAdapter : BaseAdapter, IRelationshipDataAdapter
Inheritance
RelationshipDataAdapter
Implements
Inherited Members

Constructors

RelationshipDataAdapter(IResourceIdentifierObjectAdapter)

public RelationshipDataAdapter(IResourceIdentifierObjectAdapter resourceIdentifierObjectAdapter)

Parameters

resourceIdentifierObjectAdapter IResourceIdentifierObjectAdapter

Methods

Convert(SingleOrManyData<ResourceIdentifierObject>, RelationshipAttribute, bool, RequestAdapterState)

Validates and converts the specified data.

public object? Convert(SingleOrManyData<ResourceIdentifierObject> data, RelationshipAttribute relationship, bool useToManyElementType, RequestAdapterState state)

Parameters

data SingleOrManyData<ResourceIdentifierObject>
relationship RelationshipAttribute
useToManyElementType bool
state RequestAdapterState

Returns

object

Convert(SingleOrManyData<ResourceObject>, RelationshipAttribute, bool, RequestAdapterState)

Validates and converts the specified data.

public object? Convert(SingleOrManyData<ResourceObject> data, RelationshipAttribute relationship, bool useToManyElementType, RequestAdapterState state)

Parameters

data SingleOrManyData<ResourceObject>
relationship RelationshipAttribute
useToManyElementType bool
state RequestAdapterState

Returns

object