MVC recommended tutorials and articles
Getting Started
- Getting Started with ASP.NET MVC 5 This 11 part series is a good place to start.
- Pluralsight ASP.NET MVC 5 Fundamentals (video course)
- Lifecycle of an ASP.NET MVC 5 Application PDF document that charts the lifecycle of an ASP.NET MVC 5 app.
Working with data
- Getting Started with EF 6 Code First using MVC 5 Tom Dykstra's award winning series dives deep into EF.
Security
- Create an ASP.NET MVC app with auth and SQL DB and deploy to Azure This popular tutorial walks you through creating a simple app and adding membership and roles.
- Create an ASP.NET MVC 5 App with Facebook, Twitter, LinkedIn and Google OAuth2 Sign-on This tutorial shows you how to build an ASP.NET MVC 5 web application that enables users to log in using OAuth 2.0 with credentials from an external authentication provider, such as Facebook, Twitter, LinkedIn, Microsoft, or Google.
- Create a secure ASP.NET MVC 5 web app with log in, email confirmation and password reset First in a series on Identity, includes code to resend a confirmation link.
- ASP.NET MVC 5 app with SMS and email Two-Factor Authentication Second on Identity series.
- Best practices for deploying passwords and other sensitive data to ASP.NET and Azure App Service
- Two-factor authentication using SMS and email with ASP.NET Identity
isPersistent
and the security cookie, code to require a user to have a validated email account before they can log on, how SignInManager checks for 2FA requirement, and more. - Account Confirmation and Password Recovery with ASP.NET Identity Provides details on Identity not found in Create a secure ASP.NET MVC 5 web app with log in, email confirmation and password reset such as how to let users reset their forgotten password.
Azure
- Create an ASP.NET web app in Azure Short and simple tutorial for deployment to Azure.
- Create an ASP.NET MVC app with auth and SQL DB and deploy to Azure
Performance and Debugging
ASP.NET MVC DropDownListFor with SelectListItem
When using the DropDownListFor helper and passing to it the collection of SelectListItem
from which it is populated, the DropdownListFor
modifies the passed collection after it is called. DropdownListFor
changes the SelectListItems
Selected properties to whatever was selected by the dropdown list. This leads to unexpected behavior.
The DropDownListFor, DropDownList, EnumDropDownListFor, ListBox, and ListBoxFor update the Selected property of any IEnumerable<SelectListItem>
passed or found in ViewData.
The workaround is to create separate enumerables, containing distinct SelectListItem
instances, for each property in the model.
For more information, see GetSelectListWithDefaultValue Modifies IEnumerable<SelectListItem> selectList