Reputation: 23
I want to inject a data service in owin startup file. For that i'm using ninject DI.
Searching in stack overflow i got the link here Resolving dependencies in OWIN WEB API Startup.cs with ninject where the solution given by mr Erik Funkenbusch. Over the link i followed the part EDIT (4/6/15). Do so i'm getting the error at startup file "var kernel = ConfigureNinject(app);"
The name 'ConfigureNinject' does not exist in the current context.
As instructed i have followed by creating the class named Startup.Ninject.cs under App_start folder.
Would be great to help me out of this. Thanks in advance
Upvotes: 0
Views: 57
Reputation: 23
Sorry busy with work. Yes, its inside partial class. Meanwhile i have the googled tried this blog. Befriending ASP.NET Web.API2, OWIN and Ninject
Its easy to do follow up. Thanks for help.
Upvotes: 0
Reputation: 11861
Make sure both your Startup.Ninject.cs and Startup.cs files have the class defined as:
public partial class Startup
Note that you have to add partial
to your existing Startup class.
Upvotes: 0