ApiAuthorizationDbContext wie kann ich für die IdentityRole und IdentityUser jeweils eine andere Tabelle nutzen?

Ingo Manthey 1 Reputation point
2021-07-10T17:48:05.097+00:00

Hallo NG,

In meinem vorherigen Project Angular habe ich den ApplicationDBContext wie folgt erstellt:

public class ApplicationDbContext : IdentityDbContext<ApplicationUser, ApplicationRole, string>

Ich möchte nun in meinem neuen Programm die selben Klassen nutzten.

public class ApplicationDbContext : ApiAuthorizationDbContext<ApplicationUser>

Wie kann ich nun dem ApplicationDBContext die ApplicationRole Klasse zuweisen und den Key als string festlegen?

Danke im voraus für jeden Hinweis und Tipp.

Grüße Ingo

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,389 questions
{count} votes