From the course: ASP.NET Core Identity: Authentication Management

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Identity model with Entity Framework

Identity model with Entity Framework - ASP.NET Core Tutorial

From the course: ASP.NET Core Identity: Authentication Management

Start my 1-month free trial

Identity model with Entity Framework

- [Instructor] When we choose individual user accounts as authentication mechanism when creating an ASP.NET Core application, identity is added to our project and identity in ASP.NET Core applications provides a framework for managing and storing user accounts. By default, identity uses the Entity Framework data model. But how can we modify the identity model by using the Entity Framework Core migrations? So first of all, we need to define a model. Then next, we add a migration. We check if this migration reflects all the changes that we want to have. And at the end, we just apply the migration. To add and apply migrations, we use either Package Manager Console or vPMC, the .NET Core CLI, or we can simply press the Apply Migrations button that we get when we first run our application but we have not created the database yet. And we have seen this case when we first created our applications. To see how we can modify the identity model using the Entity Framework, let us go to our…

Contents