ASCU_ALL/ShowTrend_tmp3/ShowTrend3/Startup.cs
2021-11-12 15:00:41 +05:00

40 lines
1.2 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;
namespace ShowTrend3
{
public class Startup
{
public Startup(IConfiguration configuration)
{ Configuration = configuration; }
public IConfiguration Configuration { get; }
public void ConfigureServices(IServiceCollection services)
{ services.AddMvc(); }
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
app.UseStaticFiles();
app.UseMvc(routes =>
{
routes.MapRoute("Index", "index",
new { controller = "Sau", action = "Index" });
routes.MapRoute("Analog", "analog",
new { controller = "Sau", action = "Analog" });
routes.MapRoute("Show", "show",
new { controller = "Sau", action = "Show" });
routes.MapRoute(
name: "default",
template: "{controller=Sau}/{action=Index}/{id?}");
});
}
}
}