DEV Community

Ofoedu Frank Ebuka
Ofoedu Frank Ebuka

Posted on

Seed Identity User and Role In ASP.Net Core with EF Core

Seeding is the process of creating an initial set of data in the database.

In the OnModelCreating method of my database context, I use the below code to

  • Seed a new “admin” role
  • Seed a new admin user
  • Seed admin into the role

And that’s the ef core way to seed a user into a role.

Top comments (0)