ninject-2 Questions

1

Solved

I am now using Ninject 2.2.1.4, with my MVC3, i'm success to config Ninject run with it, but i don't know how to make Ninject run with Quartz.Net in my MVC3 Can anyone help?
Neurotic asked 19/7, 2011 at 2:19

1

Solved

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 Repos...
Walz asked 19/7, 2011 at 0:21

3

Solved

Short version of my questions: Can anyone point me toward some good, detailed sources from which I can learn how to implement testing in my MVC 3 application, using NUnit, Ninject 2, and Moq? Can...
Rafaellle asked 11/7, 2011 at 5:49

4

Solved

I can't find right words for my question so i will let my code speak instead. I have Repository: class Repository { public Repository(DbContext ctx) { } } then i have this bindings: Bind&l...
Gilleod asked 16/6, 2011 at 13:59

2

Solved

I am using asp.net mvc 3, ninject 2.0 and the ninject mvc 3 plugin. I am wondering how do I get service layers into my filter(in this case an authorization filter?). I like to do constructor inje...
Horton asked 15/6, 2011 at 20:37

2

Solved

Is Kernel.Get() threadsafe? My goal is share an instance of my kernel among all my componenets and they may all very well call Kernel.Get() at the same time on different threads. Is Kernel.Get() ...
Joaniejoann asked 14/6, 2011 at 2:55

1

Solved

I have a WPF view\view-model binding pattern where I would like to resolve dependencies from Ninject by name only, rather than by type or type+name. I want to bind my view-models by name with Ninje...
Decimeter asked 14/6, 2011 at 13:19

1

Solved

I have an abstract class: public abstract class Validator<T> : IValidator and a couple of classes that implement this class for specific purposes, e.g. public sealed class NewsValidator ...
Links asked 2/6, 2011 at 19:45

1

Solved

I'm having trouble using Moq in a UnitTesting project with Ninject. First a few lines about my solution. It contains several projects (BussinesLogic, DAL, Infrastructure...). My goal is to UnitTes...
Pathway asked 29/4, 2011 at 13:4

2

Solved

I have a piece of code that runs a Parallel.Foreach on a list of items to process. Each iteration creates a couple of objects with each object instantiating and disposing it's own instance of the N...
Tartaric asked 28/4, 2011 at 14:53

1

Solved

Hello am an trying to implement a global filter with injection. The filter looks like this. public class WikiFilter : IActionFilter { private IWikiService service; public WikiFilter(IWikiServic...
Lashundalasker asked 26/4, 2011 at 12:7

2

Solved

In MVC 3 they added a Dependency Resolver what I been using. While answering someone question someone commented on you should use the Ninject MVC 3 plugin. So my question is why use it over the bu...
Boarhound asked 1/3, 2011 at 20:40

1

Solved

In a MVC3-application with Ninject.MVC 2.2.0.3 (after merge), instead of injecting repostories directly into controllers I'm trying to make a service-layer that contain the businesslogic and inject...

3

Solved

I watched the first 2 beginner tutorials for Ninject on dimecasts.net. Now, I want to use Ninject 2.2 in ASP.NET MVC 3. I want a view with a mocked out Model. I get object reference not set to an i...
Embryology asked 17/2, 2011 at 16:28

1

Solved

I'm trying to find examples on the web of how to use AOP via Ninject. Can someone confirm if AOP is available in Ninject 2 without using external libraries (i.e. Castle Windsor?). If it can be don...
Polyanthus asked 7/2, 2011 at 11:47

1

I have a Windows service that contains a file watcher that raises events when a file arrives. When an event is raised I will be using Ninject to create business layer objects that inside of them ha...
Immixture asked 23/12, 2010 at 13:24

1

Solved

I have Below code One is bindable to my User Repository and another for Cache. What scope should I use for UserRepository and Cache. Should Scope on UserRepository be Singleton? this.Bind<IUse...
Handstand asked 6/12, 2010 at 4:28

1

I just upgraded an existing implementation of Ninject from 1.5 to 2.0. I'm now seeing an intermittent exception getting thrown when many requests are happening in a short period of time. Here's t...
Domenicadomenico asked 1/10, 2010 at 18:6

1

I have a situation where I want to dependency inject my user object, but also place the current user in the IoC container. I want the following lines to work: kernel.Get<User>(); // Should r...
Sukiyaki asked 9/9, 2010 at 14:54

1

Solved

Changes in Ninject 2 say that Ninject support Common Service Locator, but how do I use it? I don't find any manual or sample.

3

Solved

Is there a way to use Property Injection in Ninject 2 without using the [Inject] attribute? This creates a dependency to Ninject in the class that will be wired using it and I prefer to avoid havin...
Alida asked 12/7, 2010 at 18:53

1

Solved

I'm just getting started with Dependency Injection (DI) using Ninject and am working through my controllers looking to decouple them from my models a bit more. At the moment, inside of my controll...

1

Solved

I want to share the container across various layers in my application. I started creating a static class which initialises the container and register types in the container. public class GeneralDI...
Aliber asked 19/5, 2010 at 3:41

4

Solved

When using Ninjects ConstructorArgument you can specify the exact value to inject to specific parameters. Why can't this value be null, or how can I make it work? Maybe it's not something you'd lik...
Bulgarian asked 19/4, 2010 at 12:14

1

Solved

I'm using asp.net MVC 2 and Ninject 2. The setup is very simple. Controller calls service that calls repository. In my controller I use inject to instantiate the service classes with no problem. ...
Mallet asked 4/4, 2010 at 14:28

© 2022 - 2024 — McMap. All rights reserved.