mirror of
https://github.com/ryzij/ServerMonitor.git
synced 2026-09-18 19:23:22 +00:00
Добавил сервис и контроллер для управления серверами
This commit is contained in:
@@ -2,6 +2,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
using MonitorPanel.Core.Abstractions;
|
||||
using MonitorPanel.DataAccess;
|
||||
using MonitorPanel.DataAccess.Repositories;
|
||||
using MonitorPanel.Application.Services;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
@@ -16,7 +17,9 @@ builder.Services.AddSwaggerGen();
|
||||
builder.Services.AddDbContext<MonitorPanelDbContext>(options =>
|
||||
options.UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection")));
|
||||
|
||||
builder.Services.AddScoped<IServersRepository, ServersRepository>();
|
||||
builder.Services
|
||||
.AddScoped<IServersRepository, ServersRepository>()
|
||||
.AddScoped<IServerService, ServerService>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user