Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding Ninject bindings

  • Loading branch information...
commit 1c0864a10f23ee2afa11fbdc82650ff2eacd73a8 1 parent 491b747
Hrusikesh Panda mrchief authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 Ebuy.Website/App_Start/NinjectWebCommon.cs
6 Ebuy.Website/App_Start/NinjectWebCommon.cs
View
@@ -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>();
+
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.