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

Make ActionDescriptor accessible in IModelBinder.BindModelAsync #3257

Closed
djanosik opened this issue Oct 5, 2015 · 3 comments
Closed

Make ActionDescriptor accessible in IModelBinder.BindModelAsync #3257

djanosik opened this issue Oct 5, 2015 · 3 comments

Comments

@djanosik
Copy link

djanosik commented Oct 5, 2015

I've found it would be useful if we could access ActionDescriptor in the IModelBinder.BindModelAsync method. In Web API 2 there is another parameter of type HttpActionContext. Can you bring it back to MVC 6?

@djanosik djanosik changed the title Make ActionDescriptor accessible from IModelBinder.BindModelAsync Make ActionDescriptor accessible in IModelBinder.BindModelAsync Oct 5, 2015
@rynowak
Copy link
Member

rynowak commented Oct 5, 2015

What are you trying to accomplish? There's probably a better way to do it now with ResourceFilters

@djanosik
Copy link
Author

djanosik commented Oct 5, 2015

I want to decide how to bind the model according to a return type of the action method.

@danroth27 danroth27 added this to the 6.0.0-rc1 milestone Oct 5, 2015
@Eilon Eilon modified the milestones: 6.0.0-rc1, 1.0.0-rc2 Oct 22, 2015
@rynowak
Copy link
Member

rynowak commented Nov 25, 2015

Fixed by 0832365

context.OperationBindingContext.ActionContext.ActionDescriptor - we hope to simplify it more than this, but it's possible for now.

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

4 participants