コード例 #1
0
ファイル: Configuration.cs プロジェクト: BuyaUp/ProjectoAlexa
        protected override void Seed(ProjectoAlexa.Data.DataContexts.ProjectoBaseDataContext context)
        {
            //  This method will be called after migrating to the latest version.

            UsuarioPerfilSeed.Seed(context);
            UsuarioSeed.Seed(context);
            ProvinciaSeed.Seed(context);
            AreaSeed.Seed(context);
            TempoExameSeed.Seed(context);
        }
コード例 #2
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, UsuarioSeed usuario, IHostingEnvironment env, ILoggerFactory loggerFactory)
        {
            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();

            //SampleData.Initialize(app.ApplicationServices);
            if (env.IsDevelopment())
            {
                app.UseBrowserLink();
                app.UseDeveloperExceptionPage();
                app.UseDatabaseErrorPage();
            }
            else
            {
                app.UseExceptionHandler("/Home/Error");

                // For more details on creating database during deployment see http://go.microsoft.com/fwlink/?LinkID=615859
                try
                {
                    using (var serviceScope = app.ApplicationServices.GetRequiredService <IServiceScopeFactory>()
                                              .CreateScope())
                    {
                        serviceScope.ServiceProvider.GetService <ApplicationDbContext>()
                        .Database.Migrate();
                    }
                }
                catch { }
            }

            app.UseIISPlatformHandler(options => options.AuthenticationDescriptions.Clear());

            app.UseStaticFiles();

            app.UseIdentity();


            usuario.EnsureData();

            // To configure external authentication please see http://go.microsoft.com/fwlink/?LinkID=532715

            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller=Home}/{action=Index}/{id?}");
            });
        }
コード例 #3
0
ファイル: Configuration.cs プロジェクト: fabriciodsr/BMNews
 protected override void Seed(BMNewsContext context)
 {
     UsuarioSeed.Seed(context);
 }
コード例 #4
0
ファイル: Seed.cs プロジェクト: CleberBrns/TC_UNIP
 public static void SeedTcUnip(TcUnipContext context)
 {
     ModalidadeSeed.Seed(context);
     TipoPerfilSeed.Seed(context);
     UsuarioSeed.Seed(context);
 }
コード例 #5
0
 protected override void Seed(GMSContext context)
 {
     UsuarioSeed.Seed(context);
 }
コード例 #6
0
ファイル: Configuration.cs プロジェクト: Soleny/Rodrigues
 protected override void Seed(TutorialEcommerce.Repositories.EfDbContext context)
 {
     UsuarioSeed.Seed(context);
 }