Skip to content

Recommended method for changing Get IQueryable for EF document materializer #121

Open
@ClintGood

Description

@ClintGood

Thanks to all that put their efforts into this project.

I understand that as per the JSON API we can add filter expressions to the URL and they affect the records returned from get requests.

My use case is that I want to filter records returned, even without the query expression in the URL. To take my case as an example I have a self referential EF entity that forms a tree.

I want a request to "/things" to only return any root nodes, not all nodes in the entire tree.

To me it appears solution would be to change EntityFrameworkDocumentMaterializer.GetRecords so that it used new property in the IResourceTypeConfiguration interface and optionally included a where clause.

Would this be the way to implement this functionality or would another method be a better fit?

There was talk of changing of how configuration worked. Has there been any progress in this area or is there a vision for how this could be changed?

Any guidance on how you would envisage this functionality being implemented, or problems with my plan is appreciated and may increase any work I do in my fork being useful to the project in general.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions