23 lines
561 B
C#
23 lines
561 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using RecordMyRuck.Models;
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
builder.Services.AddControllersWithViews();
|
|
builder.Services.AddDbContext<RecordMyRuck.Models.RecordMyRuckDbContext>(options =>
|
|
{
|
|
options.UseSqlite(builder.Configuration["ConnectionStrings:AppDb"]);
|
|
});
|
|
builder.Services.AddScoped<IRuckRepository, RuckRepository>();
|
|
|
|
var app = builder.Build();
|
|
|
|
if (app.Environment.IsDevelopment())
|
|
{
|
|
app.UseDeveloperExceptionPage();
|
|
}
|
|
|
|
app.MapDefaultControllerRoute();
|
|
|
|
app.Run();
|