iris/_benchmarks/netcore/Startup.cs
kataras 15feaf0237 Update to version 8.5.5 | Read HISTORY.md
Former-commit-id: dced7d472edabbab4f80c76051f13261928a8dea
2017-11-02 05:54:33 +02:00

39 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.Http;
namespace netcore
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
public void ConfigureServices(IServiceCollection services)
{
services.AddRouting();
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
var routeBuilder = new RouteBuilder(app);
routeBuilder.MapGet("api/values/{id}", context =>{
return context.Response.WriteAsync("value");
});
var routes = routeBuilder.Build();
app.UseRouter(routes);
}
}
}