Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2
Dependency Injection migration #137
Copy link
Copy link
Labels
Area: WebRelates to the `AspNetCore` or other web-related functionality.Relates to the `AspNetCore` or other web-related functionality.Priority: 3Severity 0: Nice to haveStatus 2: ScheduledPlanned for an upcoming release.Planned for an upcoming release.Type: FeatureIntroduces a major area of functionality.Introduces a major area of functionality.
Milestone
Description
Metadata
Metadata
Assignees
Labels
Area: WebRelates to the `AspNetCore` or other web-related functionality.Relates to the `AspNetCore` or other web-related functionality.Priority: 3Severity 0: Nice to haveStatus 2: ScheduledPlanned for an upcoming release.Planned for an upcoming release.Type: FeatureIntroduces a major area of functionality.Introduces a major area of functionality.
The sample application (and most implementors) currently wire up services manually via a custom "activator" that constructs each dependency via a switch, rather than using .NET's standard, built-in dependency-injection container. This replaces that with idiomatic DI registration.
Tasks
AddOnTopic()registration helper for the core mapping/lookup services (ServiceCollectionExtensions,OnTopic.AspNetCore.Mvc)AddTopicNavigation<TViewModel>()helper for the hierarchical navigation service (ServiceCollectionExtensions)AddSqlTopicRepository()helper for the SQL repository (OnTopic.Data.Sql)AddTopicCaching()helper for the caching repository (OnTopic.Data.Caching)SampleActivator,Program,OnTopic.AspNetCore.Mvc.Host)SampleActivator,OnTopic.AspNetCore.Mvc.IntegrationTests.Host)SampleActivator