editorconfig added,
modelbuilder fix for local connString
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user