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

Better DI For controllers - Action parameter injection #605

Closed
yishaigalatzer opened this issue Jun 3, 2014 · 4 comments
Closed

Better DI For controllers - Action parameter injection #605

yishaigalatzer opened this issue Jun 3, 2014 · 4 comments

Comments

@yishaigalatzer
Copy link
Contributor

No description provided.

@tugberkugurlu
Copy link
Contributor

I guess this means that we won't need custom parameter binding for things like IPrincipal, CancellationToken, etc. for actions, correct?

@pranavkm
Copy link
Contributor

pranavkm commented Jul 3, 2014

Related to #454

@pranavkm
Copy link
Contributor

pranavkm commented Jul 3, 2014

@tugberkugurlu quick feedback -

IPrincipal does not need to be injected it's directly supported from the Context now. Do you feel we need to support explicitly injecting it as a property and action parameter? We think not, but we are open to hearing a compelling argument :)

See controller code: https://github.com/aspnet/Mvc/blob/dev/src/Microsoft.AspNet.Mvc.Core/Controller.cs#L41-L52

We can look at CancellationToken but we need to figure out what to do about them top level. See #743

@pranavkm
Copy link
Contributor

This is being tracked via #801.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants