- SQL-SELECT-Anweisungen in Dokumenten aktualisiert, um alle Spalten abzurufen.

- Prioritätsbehandlung für document_path_dmz in EnvelopeService.LoadEnvelopes hinzugefügt.
- CRUD-Operationen in EnvlopeDocument und ConfigurationFile Services/Repositories unter Verwendung von WebCoreModules implementiert.
- Verschiedene Dateimethoden in [spezifischen Orten oder Klassen, falls zutreffend] auf async umgestellt.
This commit is contained in:
Developer 02
2024-03-14 12:46:38 +01:00
parent a2b0682a77
commit 6f59906a7e
37 changed files with 624 additions and 93 deletions

View File

@@ -1,6 +1,12 @@
using DigitalData.Modules.Logging;
using EnvelopeGenerator.Common;
using DigitalData.Core.CultureServices;
using DigitalData.UserManager.Infrastructure.Repositories;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.MappingProfiles;
using EnvelopeGenerator.Application.Services;
using EnvelopeGenerator.Infrastructure.Contracts;
using EnvelopeGenerator.Infrastructure.Repositories;
using EnvelopeGenerator.Web.Services;
using Microsoft.EntityFrameworkCore;
using Quartz;
namespace EnvelopeGenerator.Web
@@ -13,10 +19,10 @@ namespace EnvelopeGenerator.Web
// Add base services
builder.Services.AddSingleton<LoggingService>();
builder.Services.AddTransient<DatabaseService>();
builder.Services.AddScoped<DatabaseService>();
// Add higher order services
builder.Services.AddSingleton<EnvelopeService>();
builder.Services.AddScoped<EnvelopeService>();
// Add services to the container.
builder.Services.AddControllersWithViews().AddJsonOptions(q =>
@@ -25,6 +31,26 @@ namespace EnvelopeGenerator.Web
q.JsonSerializerOptions.ReferenceHandler = System.Text.Json.Serialization.ReferenceHandler.IgnoreCycles;
});
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddKeyTranslationService();
//AddEF Core dbcontext
var connStr = builder.Configuration["Config:ConnectionString"];
builder.Services.AddDbContext<EGDbContext>(options =>
options.UseSqlServer(connStr));
//Inject CRUD Service and repositories
builder.Services.AddScoped<IConfigRepository, ConfigRepository>();
builder.Services.AddScoped<IEnvelopeDocumentRepository, EnvelopeDocumentRepository>();
builder.Services.AddScoped<IConfigService, ConfigService>();
builder.Services.AddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>();
//Auto mapping profiles
builder.Services.AddAutoMapper(typeof(BasicDtoMappingProfile).Assembly);
var app = builder.Build();
// Configure the HTTP request pipeline.
@@ -35,6 +61,9 @@ namespace EnvelopeGenerator.Web
app.UseHsts();
}
app.UseSwagger();
app.UseSwaggerUI();
app.UseHttpsRedirection();
app.UseStaticFiles();