del
del

Reputation: 39

problems with identityuser role asp.net core

enter image description here

enter image description here

What do I do to correct this?
I am trying to implement roles. My db context was formed in a scaffolding of the database, so I don't know which class I should derivate.

enter image description here

Upvotes: 1

Views: 202

Answers (1)

Jerdine Sabio
Jerdine Sabio

Reputation: 6185

The error is the type you are passing at .AddRoles(), it should be IdentityRole not IdentityUser.

Use the code below;

.AddRoles<IdentityRole>()

Upvotes: 2

Related Questions