record-my-ruck/RecordMyRuck/Program.cs
2024-05-16 22:30:18 -06:00

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();