This project is read-only.

How to

First off you download the assemblies from this site, or get them off NuGet http://nuget.org/packages/mvcbootstrap and http://nuget.org/packages/mvcbootstrap.mongodb. If you're manually downloading the assemblies, make sure your MVC application has a reference to the applicationboilerplate, mvcbootstrap and localization assemblies. You'll also need to reference the dependency injection and data access implementations, the default implementations are the mvcbootstrap.ninject and mvcbootstrap.entityframework assemblies.

With that out of the way, you're ready to start using MVC Bootstrap.

Bootstrapping

Open up the global.asax.cs file of your project, override the Application-Start method like this:

using ApplicationBoilerplate.DependencyInjection;
using MVCBootstrap.DependencyInjection;
using MVCBootstrap.Ninject;

protected void Application_Start() {
	new ApplicationInitializer(
		new DependencyContainer(), new IDependencyBuilder[] {
			new MVCBootstrap.EntityFramework.DependencyInjection.DataProviderBuilder(),
			//new MVCBootstrap.Profiling.DataProviderBuilder(),
			//new MVCBootstrap.MongoDB.DependencyInjection.DataProviderBuilder(),
			new LocalizationBuilder(),
			new ProviderBuilder()
		});

	AreaRegistration.RegisterAllAreas();

	RegisterGlobalFilters(GlobalFilters.Filters);
	RegisterRoutes(RouteTable.Routes);
}

This is the default setup, but most likely you will want to change things a bit, especially the data provider setup, more on that topic on the "Data Provider" page.

Areas of interest

Last edited Jan 2, 2013 at 7:29 AM by steentottrup, version 20

Comments

No comments yet.