Advertisement
Stefan_Stanchev

Untitled

Mar 25th, 2023
708
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.76 KB | None | 0 0
  1. using BankSystem.Controllers;
  2. using BankSystem.Service;
  3. using BankSystem.View;
  4. using System;
  5.  
  6. var builder = WebApplication.CreateBuilder(args);
  7.  
  8. // Add services to the container.
  9. builder.Services.AddControllersWithViews();
  10.  
  11. var app = builder.Build();
  12.  
  13. // Configure the HTTP request pipeline.
  14. if (!app.Environment.IsDevelopment())
  15. {
  16.     app.UseExceptionHandler("/Home/Error");
  17.     // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
  18.     app.UseHsts();
  19. }
  20.  
  21. app.UseHttpsRedirection();
  22. app.UseStaticFiles();
  23.  
  24. app.UseRouting();
  25.  
  26. app.UseAuthorization();
  27.  
  28. app.MapControllerRoute(
  29.     name: "default",
  30.     pattern: "{controller=BankController}/{action=AppView}/{id?}");
  31.  
  32. app.Run();
  33.  
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement