Ejemplo n.º 1
0
        public static async Task SeedDatabase()
        {
            using var scope = _scopeFactory.CreateScope();
            var db     = scope.ServiceProvider.GetService <ApplicationDbContext>();
            var userId = await RunAsDefaultUserAsync();

            await FeedSeed.Seed(db, userId);

            await PostSeed.Seed(db, userId);
        }
Ejemplo n.º 2
0
        protected override void Seed(Portal.CMS.Entities.PortalEntityModel context)
        {
            ThemeSeed.Seed(context);
            RoleSeed.Seed(context);
            SettingSeed.Seed(context);
            PostCategorySeed.Seed(context);
            PageSectionTypeSeed.Seed(context);
            PageComponentTypeSeed.Seed(context);
            MediaSeed.Seed(context);
            CopySeed.Seed(context);
            context.SaveChanges();

            MenuSeed.Seed(context);
            PageSeed.Seed(context);
            PostSeed.Seed(context);
        }