You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Add an AddOnTopic() registration helper for the core mapping/lookup services (ServiceCollectionExtensions, OnTopic.AspNetCore.Mvc)
Add an AddTopicNavigation<TViewModel>() helper for the hierarchical navigation service (ServiceCollectionExtensions)
Add an AddSqlTopicRepository() helper for the SQL repository (OnTopic.Data.Sql)
Add an AddTopicCaching() helper for the caching repository (OnTopic.Data.Caching)
Must register ITopicRepository as a singleton; anything less silently creates a fresh, empty cache per request
Delete the activator from the sample host; wire it up via the new registration helpers (SampleActivator, Program, OnTopic.AspNetCore.Mvc.Host)
Delete the activator from the integration test host; wire it up the same way (SampleActivator, OnTopic.AspNetCore.Mvc.IntegrationTests.Host)
Apply the same pattern to the OnTopic Editor's SampleActivator
Activity
Refresh()as a scheduled service #138CacheProfile#150