You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Currently I have to override the default ODataResourceSetSerializer to get $count=true (inline count) of expanded child collections to work as expected. The standard ODataResourceSetSerializer uses the ICountOptionCollection (that has one simple property defined TotalCount) to get total count of an expanded collection. The interface is internal and only implemented by TruncatedCollection. My OData service does not have any CLR backing types nor do I have any in memory Lists or Collections of objects - in other words: I do not use TruncatedCollection but have my own non in-memory based implementation where I wan't to implement the ICountOptionCollection interface to get the standard ODataResourceSetSerializer to work for expanded child counts.
Reproduce steps
Try to implement ICountOptionCollection
Data Model
NA
EDM (CSDL) Model
NA
Request/Response
NA
Expected behavior
I can implement ICountOptionCollection.
Screenshots
NA
Additional context
Currently I am forced to override the standard ODataResourceSetSerializer to get this to work. It is quite alot of code I need to replicate. Recently alot of changes were done to the standard serializers due some changes to Delta sets. This requires porting to my custom serializer. It would be nice to be able to avoid that.
The text was updated successfully, but these errors were encountered:
Assemblies affected
ASP.NET Core OData 8.x
Describe the bug
Currently I have to override the default ODataResourceSetSerializer to get $count=true (inline count) of expanded child collections to work as expected. The standard ODataResourceSetSerializer uses the ICountOptionCollection (that has one simple property defined TotalCount) to get total count of an expanded collection. The interface is internal and only implemented by TruncatedCollection. My OData service does not have any CLR backing types nor do I have any in memory Lists or Collections of objects - in other words: I do not use TruncatedCollection but have my own non in-memory based implementation where I wan't to implement the ICountOptionCollection interface to get the standard ODataResourceSetSerializer to work for expanded child counts.
Reproduce steps
Try to implement ICountOptionCollection
Data Model
NA
EDM (CSDL) Model
NA
Request/Response
NA
Expected behavior
I can implement ICountOptionCollection.
Screenshots
NA
Additional context
Currently I am forced to override the standard ODataResourceSetSerializer to get this to work. It is quite alot of code I need to replicate. Recently alot of changes were done to the standard serializers due some changes to Delta sets. This requires porting to my custom serializer. It would be nice to be able to avoid that.
The text was updated successfully, but these errors were encountered: