Questions tagged [ninject.web.mvc]

extension for ninject providing integration with ASP.NET MVC

Use this tag on questions that describe issues with this specific extension of the framework.

Main features that your question is about:

  • The integration between the Ninject core and ASP.NET MVC
  • Your extended HttpApplication (in Global.asax.cs) with NinjectHttpApplication
  • The activation of your controllers
  • Exposed dependencies and injections of types in
    • constructors
    • properties
    • methods

Github ninject.web.mvc extension

298 questions
0
votes
2 answers

How to Debug NinjectWebCommon.cs?

We are trying to debug through ninjectwebcommon.cs to find the binding for a respository. In VS 2012, I am putting a Debugpoint on the kernel.bind but it doesnot hit anytime. Can someone sugggest me how to debug this? I have NInject Version…
0
votes
2 answers

How to depend by parent class

I have a class Handler. In the constructor I have a Manager class which depends on different settings. kernel.Bind().To(). WithConstructorArgument("manager", new…
Mediator
  • 14,951
  • 35
  • 113
  • 191
0
votes
1 answer

Configure Ninject With Stand Alone Web Api Project

Hi I am working on a project that needs a separationg beetween an mvc project and a web api project and I created both of them. Only my web api project requires a dependency injection framework so I have installed…
aleczandru
  • 5,319
  • 15
  • 62
  • 112
0
votes
2 answers

Named binding - MVC3

I'm trying to register to implementations of same interface using named instances kernel.Bind().To().InSingletonScope(); kernel.Bind().To().InSingletonScope().Named("db"); the idea, is that…
Eugen
  • 2,934
  • 2
  • 26
  • 47
0
votes
1 answer

Ninject mvc InRequestScope

I use ninject from NuGet with an MVC 4 application public class MvcApplication : System.Web.HttpApplication I know I could have used a ninject class as bas class, but I did not. In my global.asax.cs I…
tschmit007
  • 7,559
  • 2
  • 35
  • 43
0
votes
1 answer

Ninject: Use Configuration also in library

I'm starting with Ninject and I use it in a MVC 4 scenario and configured my bindings in "NinjectWebCommon". And everything works fine. Now I want in an library somehow get the kernel with the configuration from MVC app. For example: In my MVC…
SharpNoiZy
  • 1,099
  • 2
  • 11
  • 22
0
votes
1 answer

Is it possible to avoid manual object creation within DI?

As per my understanding, implementation of DI based on 1. ISampleInterface 2. Sample : ISampleInterface 3. Configuration Bind for ISampleInterface with Sample. 4. And Constructor injection ISampleInterface…
0
votes
1 answer

How to properly construct dependent objects manually?

I'm using Ninject.Web.Common and I really like Ninject so far. I'm not used to dependency injection yet so I've got a pretty lame question I can't however google and answer to so far. Suppose I have a Message Handler which depends on my IUnitOfWork…
devmiles.com
  • 9,895
  • 5
  • 31
  • 47
0
votes
1 answer

How to implement Membership provider for MVC4 Razor, with Ninject and Repository Pattern?

I unable to understand how to implement Membership provider with MVC4 Using DI (Ninject) and Repository pattern ? Any body please provide any code sample to understand how to implement this !!!
0
votes
1 answer

Ninject DependencyCreation and EventBroker extensions. Ensuring a one-to-one subscription

I'm using Ninject Event Broker extensions and I have two services. ServiceOne is the Publisher of an event. ServiceTwo is the subscriber. ServiceOne doesn't have a hard dependency to ServiceTwo, I'm creating the dependency using the…
Matt B
  • 8,315
  • 2
  • 44
  • 65
0
votes
3 answers

No Parameterless constructor defined for this object...With a twist?

I'm building an MVC4 app using EF5 and ninject. Something broke when I upgraded from MVC3 to 4. So I created a brand new solution, got all my nuget packages, added all my references, then copied in my code. Project builds, thats fabulous. My…
0
votes
1 answer

Constructor Injection for Dependent Classes

I am using Ninject in my MVC application and am trying to implement a Unit of Work repository pattern. Specifically, I have defined a generic IUnitOfWork interface, I then want to use an instance of this interface in the constructor for some other…
Neilski
  • 4,385
  • 5
  • 41
  • 74
0
votes
1 answer

How to read Azure web site app settings inside RegisterServices method

I am trying to configure some key/value pairs for my Azure web application using app settings section on Windows Azure preview portal. According to the documentation, Azure should inject configured key/value pairs into the .Net configuration…
Juraj Suchár
  • 1,107
  • 6
  • 25
0
votes
1 answer

MVC DisplayNameAttribute and Ninject: Possible?

Let's assume following basic Project-Setup: - Core -- Attributes --- CustomDisplayNameAttribute : DisplayNameAttribute - UI UI represents the MVC Web interface, the core implements all the domain business objects, including self written attributes…
sl3dg3
  • 5,026
  • 12
  • 50
  • 74
0
votes
1 answer

Getting "The resource cannot be found." error when using Ninject

I'm working on an ASP.NET MVC 3.0 application, using Ninject as my dependency injection framework. So I've inherited my controller from NinjectHttpApplication like so: public class MvcApplication : NinjectHttpApplication { protected override…
Jonathan
  • 32,202
  • 38
  • 137
  • 208
1 2 3
19
20