0

In my application I have installed the default individual authentication flow. By default my AspNetRoles is empty. I could easily add some roles using INSERT SCRIPTS, but I'm quite sure that is not how you are supposed to do that.

What is the best practice here? Is it to add them using the Seed method in the Context file, and if so, how do you do it?

I've seen an article such as this: MVC 5 Seed Users and Roles , but as far as i can read, this assumes the roles are already made before.

Lars Holdgaard
  • 9,496
  • 26
  • 102
  • 182
  • With identity, you should use the role manager. See [here](https://stackoverflow.com/questions/29526215/seed-entities-and-users-roles/29547994#29547994). Also, assuming this is EF6? – Steve Greene Aug 24 '17 at 16:16
  • @SteveGreene EF6 yes :) I do use the role manager, but this assumes we have some default roles already added. I am trying to understand how you usually seed these? – Lars Holdgaard Aug 25 '17 at 20:57

0 Answers0