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.

Limit [FromServices] to apply only to parameters #3507

Closed
@Eilon

Description

@Eilon

This should help reduce a lot of the confusion around this feature.

It currently applies to parameters and properties. The problem with properties is that it appears to many people that it can be applied to any property of any object. But in reality it works only with properties on objects that are model bound, which is controller properties, and sub-properties of types used in MVC action method parameters.

By limiting [FromServices] to only parameters, that will restrict the usage to one that will always work: top-level action method parameters.

cc @rynowak

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions