tags:

views:

2310

answers:

4

Hi

I want to get started using Dependency Injection and IOC and I want to get more into using Ninject.

Are there any good application with sourcecode available that is written using Ninject that I can look at as a reference?

+2  A: 

Have you look at the ninject-contrib project at Google Code?

Thedric Walker
+2  A: 

The Ninject "dojo" has a great walk through for getting started as well.

You can view it at: http://dojo.ninject.org/User%20Guide.ashx

I perfectly know IoC from PicoContainer, however I just can't make the simplest thing in NInject work. Can someone provide 10-line console project where things work? Specifically using [Inject] attribute.
aloneguid
Here's a pretty good walk through site that should explain it @aloneguidhttp://ryanlanciaux.com/post/real-ultimate-power--dependency-injection-with-ninject.aspx
That link is no longer valid. Most of the documentation is now at the GitHub Wiki which unfortunately hasn't been completely updated to Ninject 2 yet. http://wiki.github.com/ninject/ninject/
Martin Owen
+2  A: 

Ninject can be used with various types of Applications. It could be an ASP.NET WebForms application, ASP.NET MVC application or others.

For a detailed (with screenshots) step-by-step tutorial (with sample application to download) have a look at the following in addition to the Ninject "dojo" walkthrough that bryanray has mentioned.

http://peakbyte.wordpress.com/2009/09/28/how-to-use-ninject-ioc-with-asp-net-mvc/

Please note that this tutorial was written when ASP.NET MVC 2.0 was NOT released. Tiny modifications would be needed to get it working with ASP.NET MVC 2.0, like obtaining the appropriate Ninject.Framework.MVC.dll

Mani
+1  A: 

You can take a look at Rob's MVC Starter site MVC application (MVC2 and Ninject): http://mvcstarter.codeplex.com/

VinnyG