using System.Collections.Generic; using System.Threading.Tasks; using API.Constants; using API.Entities; using Microsoft.AspNetCore.Identity; namespace API.Data { public class Seed { public static async Task SeedRoles(RoleManager roleManager) { var roles = new List { new AppRole {Name = PolicyConstants.AdminRole}, new AppRole {Name = PolicyConstants.PlebRole} }; foreach (var role in roles) { await roleManager.CreateAsync(role); } } } }