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

Remove the need for the anonymous wrapper when a View Component has one parameter and the passed in argument is assignable to that parameter #5166

Closed
danroth27 opened this issue Aug 19, 2016 · 0 comments

Comments

@danroth27
Copy link
Member

danroth27 commented Aug 19, 2016

For cases like:

public IViewComponentResult InvokeAsync(Person person) {}

Instead of this:

@await Component.InvokeAsync(SomeName, new { person = person })

You should be able to do this:

@await Component.InvokeAsync(SomeName, person)
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

2 participants