mirror of
https://github.com/hargata/lubelog.git
synced 2025-12-10 00:46:08 -06:00
29 lines
692 B
C#
29 lines
692 B
C#
using CarCareTracker.External.Implementations;
|
|
using CarCareTracker.External.Interfaces;
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
// Add services to the container.
|
|
builder.Services.AddControllersWithViews();
|
|
builder.Services.AddSingleton<IVehicleDataAccess, VehicleDataAccess>();
|
|
builder.Services.AddSingleton<INoteDataAccess, NoteDataAccess>();
|
|
|
|
var app = builder.Build();
|
|
|
|
// Configure the HTTP request pipeline.
|
|
if (!app.Environment.IsDevelopment())
|
|
{
|
|
app.UseExceptionHandler("/Home/Error");
|
|
}
|
|
app.UseStaticFiles();
|
|
|
|
app.UseRouting();
|
|
|
|
app.UseAuthorization();
|
|
|
|
app.MapControllerRoute(
|
|
name: "default",
|
|
pattern: "{controller=Home}/{action=Index}/{id?}");
|
|
|
|
app.Run();
|