michielpost.nl

NuGet Quickstart Package with integrated Membership and Role provider

08-02-2012

A common scenario when starting a new website is setting up a database, ORM mapper, some kind of dependency injection, a user/login system etc. This can be a lot of work.

I created a NuGet package which does all this for you, but only comes in one flavor :)

Using this NuGet package you get:
- Unity as IoC container (for dependency injection)
- Entity Framework as ORM (code first variant)
- SQL CE database (can be changed to SQL Express / 2008 / 2005 by modifying the connectionstring in the web.config file)
- Web security using the default ASP.Net Membership and Role model
- All of the above working nicely together

https://www.nuget.org/packages/quickstart.mvc3.unity.ef.holyprinwebsecurity

How to use this package?

Create a new EMPTY MVC 3 Web Project with Razor views.
Delete the following files:
\Views\Shared\_Layout.cshtml
\Content\Site.css

Install quickstart.mvc3.unity.ef.holyprinwebsecurity using NuGet

Delete:
Bootstrapper.cs
Unity.Mvc3.README

Hit F5 and run the application!

Default login is: Admin / admin123
This can be found in the WebSecurityDbInitializer.cs


This package builds upon:

Web Security using Holyprin:
https://github.com/holyprin/Holyprin.Web.Security

Unity.Mvc3
https://www.nuget.org/packages/Unity.Mvc3

UnityConfiguration
https://www.nuget.org/packages/UnityConfiguration

Comments


Sorrel Vesper 20-05-2012
I seem to stumble upon this error. Please help! Error 1 'Microsoft.Practices.Unity.UnityContainer' does not contain a definition for 'RegisterControllers' and no extension method 'RegisterControllers' accepting a first argument of type 'Microsoft.Practices.Unity.UnityContainer' could be found (are you missing a using directive or an assembly reference?)


syracus 03-08-2012
Same for me...no solution found so far


Eugene 12-08-2012
http://unitymvc3.codeplex.com/discussions/358761/ Solution


New Comment

Name
E-mail (not published)
Comment
Enter the code shown: