db + migrations

This commit is contained in:
Aleksandr Popov
2023-06-25 17:56:30 +02:00
parent 944712df97
commit 751982beff
11 changed files with 110 additions and 172 deletions
+4 -2
View File
@@ -1,7 +1,9 @@
using System.Reflection;
using Microsoft.EntityFrameworkCore;
using Microsoft.IdentityModel.Tokens;
using Microsoft.OpenApi.Models;
using Newtonsoft.Json.Converters;
using TURN.Services.Chess.DBModel;
namespace TURN.Services.Chess
{
@@ -16,8 +18,8 @@ namespace TURN.Services.Chess
{
jsonOptions.SerializerSettings.Converters.Add(new StringEnumConverter());
});
//_ = services.AddDbContext<ModelBaseContext>(
// options => options.UseSqlServer(Environment.GetEnvironmentVariable("DB")));
_ = services.AddDbContext<ModelBaseContext>(
options => options.UseNpgsql(Environment.GetEnvironmentVariable("DB")));
}
public void Configure(IApplicationBuilder app)