Bo master just learn ASP. NET MVC5, look at Microsoft's documentation a little bit of learning, the establishment of Firstweb to show the next, this time to establish an example with personal authentication (that is, a dynamic Web page with registration login mechanism), start, Cheer ~ ~
Create a new project, select Web->asp.net,
When you are sure, make sure that the information is selected
OK, you will see the following page, the resource group can not be new, I understand that the resource group is analogous to our Computer folder, I use my original set up a resource group, the database server does not have to create a new, after the completion, enter their own database password, to remember this database password AH ~ ~
The solution file that you got after you identified is similar to Jiangzi ~
Here is an extremely useful tool, Entity Framework (EF) Code first. We open the Package Manager console, Input: enable-migrations, enter, just like Jiangzi ~
We are here on the basis of the template, add a number of attributes, so enter Models\identitymodels.cs, add public class Applicationuser:identityuser {public string studentid{get; set;}}
Just like this.
OK, use string to indicate StudentID bad, I am wrong, I will change.
When we add a property, we should update the database to reflect the change. This will tell you why EF works ... In the Package Manager console, enter: Add-migration "StudentID", this action will add a migration folder to your project. Enter: Update-database to update the database.
Add the StudentID property in Models\accountviewmodels.cs. Just like this.
Add StudentID to Views\account, just like this
<class= "Form-group"> @Html. Labelfor (M=>m.studentid, New {@class = "col-md-2 Control-label"}) <class= "col-md-10" > @Html. textboxfor (M = M.studentid, new {@class = "Form-control"}) </div< /c18>> </div>
Update the register Action in AccountController, just like this
Then debug to see the effect
Publish: Right-click on project and you will see this
After the configuration in the inside (in fact there is nothing to configure, Microsoft to help you fix it, you really can not verify the connection, preview what), publish, wait a moment, your site has been published to Azure above.
ASP. MVC5 QuickStart--myfirstweb and publishing to Windows Azure