예제 #1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, IConfiguration configuration, ILoggerFactory loggerFactory,
            NameSorterContext context)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseStaticFiles();

            app.UseMvc(configureRoutes);

            loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Information);


            if (env.IsDevelopment())
            {
                context.Database.Migrate();
            }
            //app.Run(async (context) =>
            //{
            //    var greeting = greeter.ReadFile();
            //    context.Response.ContentType = "text/plain";
            //    await context.Response.WriteAsync(greeting);

            //});

        }
예제 #2
0
 public PersonRepository(NameSorterContext ctx)
 {
     _ctx = ctx;
 }