I am trying to learn how to use dependency injection and Ninject. I've been reading blog posts on the topic and Mark Seeman's book "Dependency Injection in .NET". While I have a general understanding of DI, I have troubles understanding how to organize code in a n-tier web application.
Does anyone know of a project sample that I can download, or a blog post to review? Even better if the sample is based on Ninject and MVC3.
NerdDinner is a sample ASP.NET MVC project, and it has been updated to MVC 3: http://nerddinner.codeplex.com/
There are modified versions of the old MVC 2 version that use Ninject and Unity for dependency injection: http://nerddinneraddons.codeplex.com/ The author of those projects provided a different sample application using MVC 3 and Entity Framework 4.1: http://efmvc.codeplex.com/ but used AutoFac rather than Ninject for dependency injection.
There's S#arp Lite, a light version of S#arp Architecture recently started by S#arp Architecture's original author.
His introductory blogposts:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With