Ejemplo n.º 1
0
        public static async Task Initialize(GoDbContext context,
                                            UserManager <GoUser> userManager,
                                            RoleManager <ApplicationRole> roleManager,
                                            IServiceProvider serviceProvider)
        {
            context.Database.EnsureCreated();
            await SeedUsers.Seed(serviceProvider, context, userManager, roleManager);

            await SeedCourses.Seed(serviceProvider, context);

            await SeedCoursesUsers.Seed(serviceProvider, context);

            await SeedDestinations.Seed(serviceProvider, context);

            await SeedDestinationsUsers.Seed(serviceProvider, context);

            await SeedComments.Seed(serviceProvider, context);

            await SeedStories.Seed(serviceProvider, context);

            await SeedGames.Seed(serviceProvider, context);

            await SeedLevelGameParticipants.Seed(serviceProvider, context);
        }
Ejemplo n.º 2
0
 public AccountController(SignInManager <IdentityUser> signInManager, UserManager <IdentityUser> userManager)
 {
     _signInManager = signInManager;
     SeedUsers.Seed(userManager).Wait();
 }