Skip to content

Instantly share code, notes, and snippets.

@grishin
Created January 25, 2014 15:49
Show Gist options
  • Select an option

  • Save grishin/8618342 to your computer and use it in GitHub Desktop.

Select an option

Save grishin/8618342 to your computer and use it in GitHub Desktop.
How to inject Entity Framework into controller with Ninject
private static void RegisterServices(IKernel kernel)
{
kernel.Bind<MyDbContext>().ToSelf().InRequestScope();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment