예제 #1
0
 public static bool Seed()
 {
     using (var quantusUserContext = new QuantusUserContext(GetQuantusUserConnectionStringFromAppsettingsJson()))
     {
         //try
         //{
         return(quantusUserContext.EnsureSeedDataForContext());
         //}
         //catch (Exception ex)
         //{
         //    var msg = ex.Message;
         //}
     }
 }
예제 #2
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env,
                              ILoggerFactory loggerFactory, QuantusUserContext quantusUserContext)
        {
            loggerFactory.AddConsole();
            loggerFactory.AddDebug();

            //if (env.IsDevelopment())
            //{
            app.UseDeveloperExceptionPage();
            //}

            //quantusUserContext.Database.Migrate(); // Ensure database is created and pending migrations are executed
            //quantusUserContext.EnsureSeedDataForContext();

            app.UseIdentityServer();

            app.UseStaticFiles();

            app.UseMvcWithDefaultRoute();
        }