New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dependency Injection in Views #128
Comments
@danroth27 Do you want me to expand on what's already here: https://github.com/aspnet/Docs/blob/master/mvc/views/dependency-injection.rst |
@rynowak @Eilon @NTaylorMullen Does this article need more detail or should we just leave it as is? |
Hmm, i'm not sure this warrants an entire article. |
The doc doesn't really say why you'd want to do this. Are we trying to have some conceptual content in here? BTW this will eat at me forever unless I say something: there are spaces missing after some of the colons in the code: <li>Items: @await Statistics.GetCount()</li>
<li>Completed:@await Statistics.GetCompletedCount()</li>
<li>Average Priority:@await Statistics.GetAveragePriority()</li> |
In the community stand up it was stated that the purpose of dependency injection in views is to have the controller not need to know about view specific services. |
@danroth27 should I write something up that includes some conceptual background and answers @Eilon 's why question? |
@ardalis Sounds good - one example use case is the view localizer service. |
@danroth27 it looks like this sample is post-RC1; |
@ardalis No, let's not wait. We can either refer to the correct APIs in RC1, or just remove the localization content from this article for now. |
ASP.NET MVC -> Views -> Dependency Injection in Views
The text was updated successfully, but these errors were encountered: