Permalink
Browse files

Adding Ninject bindings

  • Loading branch information...
1 parent 491b747 commit 1c0864a10f23ee2afa11fbdc82650ff2eacd73a8 @mrchief mrchief committed Apr 12, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 Ebuy.Website/App_Start/NinjectWebCommon.cs
View
6 Ebuy.Website/App_Start/NinjectWebCommon.cs
@@ -1,3 +1,6 @@
+using System.Data.Entity;
+using Ebuy.DataAccess;
+
[assembly: WebActivator.PreApplicationStartMethod(typeof(Ebuy.Website.App_Start.NinjectWebCommon), "Start")]
[assembly: WebActivator.ApplicationShutdownMethodAttribute(typeof(Ebuy.Website.App_Start.NinjectWebCommon), "Stop")]
@@ -53,6 +56,9 @@ private static IKernel CreateKernel()
/// <param name="kernel">The kernel.</param>
private static void RegisterServices(IKernel kernel)
{
+ kernel.Bind<DbContext>().To<EbuyDataContext>();
+ kernel.Bind<IRepository>().To<Repository>();
+
}
}
}

0 comments on commit 1c0864a

Please sign in to comment.