

Configuration.GetConnectionString("DefaultConnection"))) In Startup.ConfigureServices, remove the calls to:įor example, AddDbContext and AddDefaultIdentity are commented out in the following code: public void ConfigureServices(IServiceCollection services).When scaffolding Identity with a new data context into a project with existing individual accounts: For example, see Require Email Confirmation. Services to enable these features must be added manually. Services or service stubs aren't generated when scaffolding Identity. Services are required when using Two Factor Authentication, Account confirmation and password recovery, and other security features with Identity. Inspect the changes after running the Identity scaffolder. We recommend using a source control system that shows file differences and allows you to back out of changes. This document explains the steps needed to complete an Identity scaffolding update.
#Scaffolding design example home update#
You have the option of selecting Identity code to be generated.Īlthough the scaffolder generates most of the necessary code, you need to update your project to complete the process.
#Scaffolding design example home full#
To gain full control of the UI and not use the default RCL, see the section Create full Identity UI source.Īpplications that do not include authentication can apply the scaffolder to add the RCL Identity package. Generated code takes precedence over the same code in the Identity RCL.

For example, you could instruct the scaffolder to generate the code used in registration. You might want to generate source code so you can modify the code and change the behavior. Applications that include Identity can apply the scaffolder to selectively add the source code contained in the Identity Razor Class Library (RCL). ASP.NET Core provides ASP.NET Core Identity as a Razor Class Library.
