Skip to content

Commit e52409f

Browse files
committed
Register ErrorController with composition root of Host site
With the introduction of the `ErrorController` (e7fe64f), I'm registering the `ErrorController` with the `SampleActivator`, which acts as the composition root for dependency injection. This will allow the `ErrorController` to be properly configured with the `Host` site.
1 parent e92dd1e commit e52409f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

OnTopic.AspNetCore.Mvc.Host/SampleActivator.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ public object Create(ControllerContext context) {
117117
return type.Name switch {
118118
nameof(TopicController) =>
119119
new TopicController(_topicRepository, _topicMappingService),
120+
nameof(ErrorController) =>
121+
new ErrorController(_topicRepository, _topicMappingService),
120122
nameof(SitemapController) =>
121123
new SitemapController(_topicRepository),
122124
nameof(RedirectController) =>

0 commit comments

Comments
 (0)