editorconfig added,

modelbuilder fix for local connString
This commit is contained in:
Aleksandr Popov
2023-06-26 08:58:42 +02:00
parent cd2605efe3
commit 171b640230
8 changed files with 506 additions and 19 deletions
+2 -4
View File
@@ -1,5 +1,4 @@
using System.Reflection;
using Microsoft.EntityFrameworkCore;
using Microsoft.IdentityModel.Tokens;
using Microsoft.OpenApi.Models;
using Newtonsoft.Json.Converters;
@@ -18,8 +17,7 @@ namespace TURN.Services.Chess
{
jsonOptions.SerializerSettings.Converters.Add(new StringEnumConverter());
});
_ = services.AddDbContext<ModelBaseContext>(
options => options.UseNpgsql(Environment.GetEnvironmentVariable("DB")));
_ = services.AddDbContext<ModelBaseContext>();
}
public void Configure(IApplicationBuilder app)
@@ -48,7 +46,7 @@ namespace TURN.Services.Chess
Title = "TURN.Api.Swagger",
Version = "v1"
});
string xmlFilename = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
var xmlFilename = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
options.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, xmlFilename));
});
_ = services.AddSwaggerGenNewtonsoftSupport();