mirror of
https://github.com/ryzij/ServerMonitor.git
synced 2026-07-14 03:46:58 +00:00
Add MonitorPanel.DataAccess
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using MonitorPanel.Core.Abstractions;
|
||||
using MonitorPanel.DataAccess;
|
||||
using MonitorPanel.DataAccess.Repositories;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
@@ -8,6 +13,11 @@ builder.Services.AddOpenApi();
|
||||
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
||||
builder.Services.AddDbContext<MonitorPanelDbContext>(options =>
|
||||
options.UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection")));
|
||||
|
||||
builder.Services.AddScoped<IServersRepository, ServersRepository>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
|
||||
Reference in New Issue
Block a user