I'm able to use ninject.web.common with the ninject mvc3 package successfully in v7.
I was trying to go one step further and hook in to global and use Bootstrap.Ninject to just setup some default resolves so I don't have to manually create bindings everywhere:
public class MvcApplication : Umbraco.Web.UmbracoApplication
{
protected void Application_Start()
{
Bootstrap();
}
static void Bootstrap()
{
var kernel = DependencyResolver.Current.GetService<IKernel>();
using Bootstrap.Ninject with Umbraco 7?
Hi All,
I'm able to use ninject.web.common with the ninject mvc3 package successfully in v7.
I was trying to go one step further and hook in to global and use Bootstrap.Ninject to just setup some default resolves so I don't have to manually create bindings everywhere:
public class MvcApplication : Umbraco.Web.UmbracoApplication
{
protected void Application_Start()
{
Bootstrap();
}
static void Bootstrap()
{
var kernel = DependencyResolver.Current.GetService<IKernel>();
Bootstrapper.With.Ninject().WithContainer(kernel).Start();
kernel.Bind(configure =>
configure
.FromAssembliesMatching("TomsAssemblyOfMystery.*")
.IncludingNonePublicTypes()
.SelectAllClasses()
.BindDefaultInterface());
}
}
For some reason these bindings are never getting mapped. Just wondering if anyone has tried using Bootstrap.Ninject with umbraco?
I've double checked and my global.asax file maps to
<%@ Application Codebehind="Global.asax.cs" Inherits="TomsAssemblyOfMystery.Web.MvcApplication" Language="C#" %>
is working on a reply...