I am going to try and tackle this Membership system 1 little step at a time...
So, let's say that:
Step 1, I create an SQL database and in that database I have a Users table, very basic, that looks like this:
Users
UserID int, identity, primary key
UserName nvarchar(25)
UserPassword nvarchar (25)
UserEmail nvarchar (75)
Step 2, I create a new ASP.NET MVC3 Web Application
Step 3, I select the Internet Application template with the Razor view engine and check Use HTML 5 semantic markup
Step 4, I add an ADO.NET Entity Data Model
Step 5, In the Entity Data Model Wizard, I choose to Generate from database
Step 6, I select my data connection and select to Save entity connection settings in Web.Config
Step 7, In the Entity Data Model Wizard ==> Choose Your Database Objects, I put a check in Tables and leave the default checks in "Pluralize or singularize generated object names" and "Include foreign key columns in the model" and click Finish
Step 8, I Build Solution
Step 9, I right click in the .edmx file and choose to "Add Code Generation Item..."
Step 10, I add a new ADO.NET DbContext Generator (This then creates all of the table models)
OK, so this is where I don't know how to go any further with using the built-in Account/Membership system with my Users table. For right now, for this particular project anyway, I don't need Roles and what-not, just the [authorize] functionality...
So, what exactly, verbatim compliance, do I need to do in order for when a user comes to the website and registers or logs in, for the application to use my Users table? Ultimately so that when a user does log in, the [authorize] decoration will work for my user base.
EDIT: Thanks to olivehour ... The following changes, additions really, to make this work...
After Step 10: (side note: remove the UserPassword from your Users table, you won't need it)
Step 11, Run the aspnet_regsql.exe tool to add ASP.NET's tables to your database.
Step 12, Open up your Web.config file, copy just the "data source" information from your EntityFramework connectionString, then paste and replace the "ApplicationServices" connectionString "data source" with that of the EntityFramework's.
Step 13, In the Solution Explorer, right click on the Controller directory and Add Controller. At this point go ahead and add your UserController
Step 14, In the AccountController, in the [HttpPost] Register action method, inside of the "if (createStatus == MembershipCreateStatus.Success)" statement, add the following:
TheNameOfYourEntities db = new TheNameOfYourEntities();
User user = new TheNameOfYourProject.User();
user.UserName = model.UserName;
user.UserEmail = model.Email;
db.Users.Add(user);
db.SaveChanges();
Step 15, Build Solution, Save All, Run