Coursach/Course/ImplementerApp/Program.cs

26 lines
507 B
C#
Raw Normal View History

using Contracts.BusinessLogicsContracts;
2024-04-28 17:11:40 +04:00
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllersWithViews().AddRazorRuntimeCompilation();
2024-04-28 17:11:40 +04:00
var app = builder.Build();
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Home/Error");
app.UseHsts();
2024-04-28 17:11:40 +04:00
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthorization();
app.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
2024-04-28 17:11:40 +04:00
app.Run();