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
resourceIdentifierObjectAdapterIResourceIdentifierObjectAdapter
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
dataSingleOrManyData<ResourceIdentifierObject>relationshipRelationshipAttributeuseToManyElementTypeboolstateRequestAdapterState
Returns
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
dataSingleOrManyData<ResourceObject>relationshipRelationshipAttributeuseToManyElementTypeboolstateRequestAdapterState