Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Consider extracting functionality from Controller and ControllerBase into their own services #4523

Closed
@javiercn

Description

@javiercn

A good example for this is TryUpdateModel, it does some preprocessing and delegates the work to a static class. Instead we want these types of things to be services so that people writing POCO controllers can just get them on through the constructor, through a property or by doing GetRequiredService on the request services if they need them.

Ideally our controller base classes should be a convenience class for implementing a controller by wiring up those services for the user and providing methods that delegate the work into those services.

That way, a user should be able to write their own controller base class by picking and choosing the services that he wants to use without having to re-implement any sort of complex logic or get tied to a specific implementation.

To be clear, the main goal of this bug is to make TryUpdateModel part of a service, but there might be similar methods in Controller and ControllerBase where we might want to do the same thing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions