• Stars
    star
    242
  • Rank 161,480 (Top 4 %)
  • Language
    C#
  • License
    Other
  • Created about 15 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

extension for ninject providing integration with ASP.NET MVC

Ninject.Web.Mvc

Build status NuGet Version NuGet Downloads

This extension allows integration between the Ninject and ASP.NET MVC projects. To use it, just make your HttpApplication (typically in Global.asax.cs) extend NinjectHttpApplication:

public class YourWebApplication : NinjectHttpApplication
{
  public override void OnApplicationStarted()
  {
    // This is only needed in MVC1
    RegisterAllControllersIn("Some.Assembly.Name");
  }

  public override IKernel CreateKernel()
  {
    return new StandardKernel(new SomeModule(), new SomeOtherModule(), ...);
    
    // OR, to automatically load modules:
    
    var kernel = new StandardKernel();
    kernel.AutoLoadModules("~/bin");
    return kernel;
  }
}

Once you do this, your controllers will be activated via Ninject, meaning you can expose dependencies on their constructors (or properties, or methods) to request injections.

More Repositories

1

Ninject

the ninja of .net dependency injectors
C#
2,633
star
2

Ninject.Extensions.Wcf

Ninject WCF extensions
C#
81
star
3

Ninject.Extensions.Conventions

Convention based binding for Ninject
C#
76
star
4

Ninject.MockingKernel

Extension for Ninject aiding testability in Moq, NSubstitute, and FakeItEasy
C#
63
star
5

Ninject.Extensions.Logging

Ninject logging extensions
C#
62
star
6

Ninject.Extensions.Interception

Interception extension for Ninject
C#
58
star
7

Ninject.Web.Common

It provides the base infrastructure for all web type extension
C#
55
star
8

Ninject.Extensions.Factory

Creates factory implementations automatically
C#
39
star
9

Ninject.Web

Ninject ASP.NET Framework
C#
31
star
10

ninject1

the original version of ninject, the ninja of .net dependency injectors
C#
20
star
11

Ninject.Extensions.Xml

xml-based module loader for ninject
C#
16
star
12

Ninject.Extensions.NamedScope

This extension allows that bindings can define scopes. All dependencies can now define that they want to use this instance as their scope.
C#
16
star
13

Ninject.Extensions.ChildKernel

This Ninject extension allows that child kernels can be defined.
C#
14
star
14

Ninject.Web.Mvc.FluentValidation

Fluent validation extension for ninject.web.mvc
Batchfile
13
star
15

ninject.website

the ninject website
C#
13
star
16

Ninject.Extensions.Wf

Ninject extension for Windows Workflow Foundation 4
C#
13
star
17

Ninject.Extensions.WeakEventMessageBroker

Message broker extension for Ninject using weak events
C#
10
star
18

Ninject.Extensions.ContextPreservation

This extension preserves the context over such factories. That means the parent of the new request is the factory request.
C#
9
star
19

Ninject.Extensions.MessageBroker

Message broker extension for Ninject
C#
9
star
20

Ninject.Extensions.Azure

Adds support for role injection
C#
8
star
21

Ninject.Extensions.DependencyCreation

This module is used to create a dependency toghether with another object without having a reference to it.
C#
6
star
22

Ninject.Extensions.BbvEventBroker

This extension adds support for bbv.Common.EventBroker.
C#
4
star
23

ninject.github.com

JavaScript
2
star