コード例 #1
0
ファイル: Startup.cs プロジェクト: Guttekk/Food
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, IGreeting greeting)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.Run(async(context) =>
            {
                await context.Response.WriteAsync(greeting.GreetingOfTheDay());
            });
        }
コード例 #2
0
ファイル: Startup.cs プロジェクト: amit13gupta/odeToFood
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, IGreeting greeting, ILogger <Startup> logger)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }


            app.Run(async(context) =>
            {
                var greetings = greeting.GreetingOfTheDay();
                await context.Response.WriteAsync($"{greetings}" + $"{env.EnvironmentName}");
            });
        }