Ejemplo n.º 1
0
        public static async Task Main(string[] args)
        {
            var host = CreateHostBuilder(args).Build();

            using (var scope = host.Services.CreateScope())
            {
                var userManager = scope.ServiceProvider.GetRequiredService <UserManager <IdentityUser> >();
                var roleManager = scope.ServiceProvider.GetRequiredService <RoleManager <IdentityRole> >();
                await DbObject.InitialAsync(userManager, roleManager);
            }
            host.Run();
        }