Closed
Description
The SetAttributesToSerialize
function takes an expression to select attributes to serialize in the request document:
void SetAttributesToSerialize<TResource>(Expression<Func<TResource, dynamic>> filter) where TResource : class, IIdentifiable;
And similar for selection of relationship fields. Currently the serializer then resolves the actual AttrAttributes
and RelationshipAttributes
using the resource graph.
There are two problems with this setup
- When the list of attributes/relationships is only known at runtime it is very complicated to use the serializer: you'll need to construct a
Expression<Func<TResource, dynamic>>
instead of just being able to pass that a list of attributes/relationships - The serializer should not be responsible for resolving
AttrAttributes
andRelationshipAttributes
from and expression: theIResourceGraph
service does that.
Metadata
Metadata
Assignees
Labels
No labels