ninject-2
Moq with constructor argument
I have a factory that looks like below: public IFoo GetFoo(IFile file开发者_Go百科) { return _kernel.Get<IFoo>(new ConstructorArgument(\"file\", file));[详细]
2023-04-10 17:22 分类:问答Ninject.MockingKernel.Moq security exception
I am using Ninject for my IoC container and I\'m trying to write some unit tests.I found the Ninject Mocking Kernel so I thought I\'d give it a go but I can\'t get the simplest test to pass. I am miss[详细]
2023-04-06 20:06 分类:问答Binding Generic Repository and Specific Repository with Ninject 2.2
I have a IRepository that I have implemented in Repository and I extended Repository for specific type as UsersRepository I need to bind all types using the generic binding for Ninject however when re[详细]
2023-03-31 09:05 分类:问答Need a simple example of using nhibernate + unit of work + repository pattern + service layer + ninject
I am using nhibernate + fluent nhibernate asp.net mvc 3 ninject Currently I am using nhibernate, ninject with the repository pattern and service layers.[详细]
2023-03-28 21:50 分类:问答How to use Ninject.Web.PageBase alongside another, custom .NET PageBase
I am trying to get Ninject working with a WebForms application that already has a custom PageBase object. But, I don\'t know for sure if I can use Ninject\'s PageBase object alongside another, custom[详细]
2023-03-25 22:03 分类:问答Ninject InRequestScope missing
Have a couple of questions regarding the latest version (2.2.1.4) of ninject. Was trying to Bind a Linq2sql DataContext to a concrete implementation InRequestScope (in a class library project)[详细]
2023-03-25 19:59 分类:问答Dependency Injection: How to configure interface bindings for wrapping
So, let\'s say I have an interface IThingFactory: public interface IThingFactory { Thing GetThing(int thingId);[详细]
2023-03-22 00:11 分类:问答Ninject: How to bind an open generic with more than one type argument?
I\'m using Ninject 2.2, and I\'m trying to setup a binding for an open generic that takes two type arguments. According to this answer by qes, the correct syntax to bind IRepository<T> to Reposi[详细]
2023-03-20 23:59 分类:问答Intercepting injection
I am injecting repositories into a class, and once I\'ve injected the repositories, I\'m assigning my context to each of the repositories so I have my unit of work.[详细]
2023-03-19 21:03 分类:问答Context and parameter-specific injection down a Ninject 2 dependency graph
I am interested in creating an instance of an object that implements my IDistributor interface using IoC and Ninject.[详细]
2023-03-19 15:15 分类:问答