Matt
Matt

Reputation: 5651

Inject services into an ASP.NET MVC app using Ninject

I have Ninject working nicely in an ASP.NET MVC3 web application. I'd like to do a few things when the app starts using a service I've written. Does anyone know how I could inject a service into the MvcApplication itself inside the Global.asax.cs?

Any help appreciated.

Upvotes: 0

Views: 213

Answers (1)

Remo Gloor
Remo Gloor

Reputation: 32725

See https://github.com/ninject/ninject.web.mvc/wiki/MVC3

Using this extension the HttpApplication is injected itsself. But only property injection can be used.

Upvotes: 4

Related Questions