Identity Scaffolding Context class

Dean Everhart 1,496 Reputation points
2023-02-03T14:25:12.16+00:00

Should the existing context class be chosen at projectname.data. or a second context class be created at projectname.areas.identity.data.WebApplication1Context.

Confused about the wording in the tutorial: "create a new Data context class. Accept the default value or specify a class"

Tutorial: https://learn.microsoft.com/en-us/aspnet/core/security/authentication/scaffold-identity?view=aspnetcore-6.0&tabs=visual-studio#scaffold-identity-into-a-razor-project-with-authorization

  • Select the + button to create a new Data context class. Accept the default value or specify a class (for example, MyApplication.Data.ApplicationDbContext).
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,162 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,254 questions
0 comments No comments
{count} votes

Accepted answer
  1. AgaveJoe 26,201 Reputation points
    2023-02-03T15:16:25.41+00:00

    You did not explain exactly what you're doing. But, the scenario (link provided) is used when you want to change the Identity templated Razor Pages.

    The "Add Identity" windows is letting you select a current DbContext from the dropdown or create a new DbContext by clicking the plus button. Given the scenario, I assume you already created the DbContext and just want to select the DbContext from the dropdown.

    Capture


0 additional answers

Sort by: Most helpful