Click here to Skip to main content
15,892,809 members
Everything / Ninject

Ninject

ninject

Great Reads

by DotNetSteve
A gentle introduction for DI and IOC in the first program most of us have written - Hello World
by Daan Acohen
A general technique is shown how to resolve circular dependencies with Ninject and a helper class
by Adam Tibi
A typical implementation of a CQRS pattern ASP.NET MVC 4, Ninject and MongoDB. I will be demonstrating a sample applications that acts as a base building block for a CQRS-based architecture.
by Aless Alessio
Design your solution and code your classes as loosely-coupled objects. Learn how to use MOQ and Ninject for mocking your Service and injecting it at runtime with Ninject.

Latest Articles

by Daan Acohen
A general technique is shown how to resolve circular dependencies with Ninject and a helper class
by Aless Alessio
Design your solution and code your classes as loosely-coupled objects. Learn how to use MOQ and Ninject for mocking your Service and injecting it at runtime with Ninject.
by DotNetSteve
A gentle introduction for DI and IOC in the first program most of us have written - Hello World
by Adam Tibi
A typical implementation of a CQRS pattern ASP.NET MVC 4, Ninject and MongoDB. I will be demonstrating a sample applications that acts as a base building block for a CQRS-based architecture.

All Articles

Sort by Score

Ninject 

26 Feb 2016 by DotNetSteve
A gentle introduction for DI and IOC in the first program most of us have written - Hello World
21 Feb 2017 by Daan Acohen
A general technique is shown how to resolve circular dependencies with Ninject and a helper class
23 Dec 2012 by rwe rwer
copy and paste or click below for live online...
23 Dec 2012 by online work
http://nfl-12.blogspot.com/2012/12/watch-cleveland-vs-denver-live-stream.html[^]http://nfl-12.blogspot.com/2012/12/watch-cleveland-vs-denver-live-stream.html[^]http://nfl-12.blogspot.com/2012/12/watch-cleveland-vs-denver-live-stream.html[^]http://nfl-12.blo...
7 Jan 2013 by sohel mahmud
http://nccca-12.blogspot.com/2013/01/live-stream-alabama-vs-notre-dame.html[^]http://nccca-12.blogspot.com/2013/01/live-stream-alabama-vs-notre-dame.html[^]http://nccca-12.blogspot.com/2013/01/live-stream-alabama-vs-notre-dame.html[^]http://nccca-12.blogspot.com/2013/01/live...
17 Jan 2013 by devdev13
Please see the code below. I am trying to create a drop down by using EF database first approach, and implementing Ninject for DI. I'm new to these concepts, and I don't know what I'm doing wrong. Any help would be greatly appreciated - thanks.**Below is my Error:**Cannot implicitly...
20 Jan 2013 by Jameel VM
Please update your viewModel like belowpublic class MyViewModel { public string SelectedCityId { get; set; } public IEnumerable Cities { get; set; } }Hope this helps
1 May 2013 by Member 3224122
Hi I have multi tenancy project that is modular ,this is with MVC4 and I have ninject for ioc,for any tenant there is a kernel that is child kernel.for dlls modular in web config I probing privatePath,But child kernel not find privatePath,for class that is project modular(mvc project)throw...
23 Jun 2015 by 0bsidian
Hi there,i followed the tutorial on https://github.com/ninject/Ninject.Web.Mvc/wiki/Dependency-injection-for-filtersIt is driving me insane, the service inside the filter is null and won't change to an object instance. I tried property Injection and decorated the interface with the...
12 Oct 2015 by Wessel Beulink
Getting the following error: Error loading Ninject component ICacheNo such component has been registered in the kernel's component container.Suggestions: 1) If you have created a custom subclass for KernelBase, ensure that you have properly implemented the AddComponents()...
12 Oct 2015 by Wessel Beulink
Problem solved on deleting all ninject versions and add a other github ninject.web.mvc 3 project which solved the issue of recreating a new kernel over and over again.
3 Dec 2015 by prasadnair44@gmail.com
I'm using Generic Repository to interact with Database(I'm using EF6.0)I'm using two Databases.Ninject has been using to implement DI.Sample code snippet below.1. Generic Repository/// Genertic Repository absract class with class and context /// ///
7 Dec 2015 by prasadnair44@gmail.com
thanks for your support. Resolved the issue using Contextual Binding in Ninject
17 Jul 2016 by gaurav.s23
Error: Error activating IProductRepositoryNo matching bindings are available, and the type is not self-bindable.Activation path: 2) Injection of dependency IProductRepository into parameter productRepository of constructor of type ProductController 1) Request for...
6 Sep 2016 by OriginalGriff
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.Try it yourself, you may find it...
8 Sep 2016 by Dave Kreskowiak
Ever heard of Google, or a any search engine for that matter?You can find all this stuff yourself quite easily.
11 Oct 2016 by DEB4u
Hi All,I want to implement Ninject in our project. I went through this tutorial Implementing Dependency Injection using Ninject[^] But we have a specific requirement where We need a single instance of kernel object which would be injected with different dependencies , like Test kernel and...
22 Mar 2017 by irfankhan200
Hi,I am writing a mvc 4 application and using Ninject for dependency injection. The dependency injection class as given below public class NinjetDependencyResolver : IDependencyResolver { private IKernel kernel; public NinjetDependencyResolver() {...
22 Mar 2017 by F-ES Sitecore
Your code is create a new instance of the class so you need to obey the constructor rules. There is nothing in your code that is using Ninject so you're not doing dependency resolving. What you have to do is use the DependencyResolver to get the instance of your classc# - Asp.net mvc 4...
10 Mar 2020 by Przemysław Szkaradek
I need to contextually filter the content I can create a drop-down list with many fields, but I would like to additionally filter results from the drop-down list by typing from the keyboard What I have tried: //Class Repository ninject public...
10 Mar 2020 by Richard Deeming
If you want to modify the appearance or behaviour of the drop-down list, you're going to need a JavaScript plugin. Try Select2[^] - it will add a search box to filter your drop-down list. @Html.DropDownListFor(x => x.IdGateSize,...
23 Dec 2020 by Member 11151570
I am developing desktop base application using c# windows form. Recently I added NInject to my project, it is working good but when i call to child forms from MDI form it's asking constructor parameter of child form because i am using form...
23 Dec 2020 by Member 14670988
solution is you have to resolve Form2 as well. private void button1_Click(object sender, EventArgs e) { Form2 frm = new *Form2()*; frm.Show(); } if you rewrite it as var frm2 =...
22 Jun 2013 by Adam Tibi
A typical implementation of a CQRS pattern ASP.NET MVC 4, Ninject and MongoDB. I will be demonstrating a sample applications that acts as a base building block for a CQRS-based architecture.
10 Aug 2016 by Aless Alessio
Design your solution and code your classes as loosely-coupled objects. Learn how to use MOQ and Ninject for mocking your Service and injecting it at runtime with Ninject.
17 Jun 2013 by Phil Lee NZ
This article will show you a pattern for sending and receiving messages using Azure Service Bus + worker roles in a strongly typed manner, taking advantage of the built-in functionality that comes with Brokered Messages.
9 Feb 2013 by zahra6688
I have a multi tenant application mvc4 with modules.what I want to do is to hide complexity from modules, I want to not having some references like ninject in modules and manage dependency injection in core application .in just a modular system without lieutenant feature,i use...
17 Jul 2016 by gaurav.s23
I change the statements with fully qualified name and it worked. But i did not understand even though i have used using statements on top with Namespaces Why it did not work??In ninjectWebCommon.Cs file:private static void RegisterServices(IKernel...