maartenba / MvcSiteMapProvider

An ASP.NET MVC SiteMapProvider implementation for the ASP.NET MVC framework.
Microsoft Public License
537 stars 220 forks source link

Injecting provider into controller #466

Open furyd opened 6 years ago

furyd commented 6 years ago

I'm looking at defaulting the page title of a view to the one used in the Mvc.sitemap file. I'm using Autofac in the project, so installed the Autofac extension for the SiteMapProvider and set everything up and the breadcrumbs are still appearing, so far, so good.

However, when I inject ISiteMap or ISiteMapNode into a controller constructor, Autofac complains it cannot find them.

Any suggestions welcomed, and would I better injecting ISiteMap, ISiteMapNode or something else?

Thanks in advance