From 8958ca22433494220c6866d5f20b56486d6503c3 Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Mon, 5 Aug 2024 14:41:51 +0200 Subject: [PATCH] =?UTF-8?q?refaktor:=20Unn=C3=B6tige=20Startup.cs=20und=20?= =?UTF-8?q?local.db=20entfernen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- StaffDBServer/StaffDBServer.csproj | 6 --- StaffDBServer/Startup.cs | 75 ----------------------------- StaffDBServer/local.db | Bin 8192 -> 0 bytes 3 files changed, 81 deletions(-) delete mode 100644 StaffDBServer/Startup.cs delete mode 100644 StaffDBServer/local.db diff --git a/StaffDBServer/StaffDBServer.csproj b/StaffDBServer/StaffDBServer.csproj index fa8159b..a0c4c7d 100644 --- a/StaffDBServer/StaffDBServer.csproj +++ b/StaffDBServer/StaffDBServer.csproj @@ -32,10 +32,4 @@ - - - - PreserveNewest - - \ No newline at end of file diff --git a/StaffDBServer/Startup.cs b/StaffDBServer/Startup.cs deleted file mode 100644 index 9025d10..0000000 --- a/StaffDBServer/Startup.cs +++ /dev/null @@ -1,75 +0,0 @@ -using DAL; -using HRD.LDAPService.JWT; -using HRD.WebApi; -using HRD.WebApi.DAL.Middleware; -using HRD.WebApi.Helpers; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using NLog.Web; -using StaffDBServer.Extends; -using StaffDBServer.SharedExtensions; -using System; - -namespace StaffDBServer -{ - public class Startup - { - public void ConfigureServices(IServiceCollection services) - { - services.ConfigureWebApiExtensionsAtFirst(); //at first - - services.ConfigureRepositoryWrapper(); //add repos - - services.AddDbContext(options => - { - const int dbTimeoutInMin = 5; - var cnnStr = WebApiConfig.ConnectionString(EN_ConnectionType.SQLServer); - options - .UseSqlServer(cnnStr, - opts => opts.CommandTimeout((int)TimeSpan.FromMinutes(dbTimeoutInMin).TotalSeconds)); - }); - - services.AddStaffDBRepositories(); - - services.ConfigureWebApiExtensionsEnd(); //should come last - } - - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) - { - app.ApplicationServices.SetupNLogServiceLocator(); - - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - else - { - app.UseHsts(); - } - app.AddCustomExceptionHandling(); - - app.UseHttpsRedirection(); - - app.UseRouting(); - - app.UseCors("AllowAllOrigins"); - - app.UseDefaultFiles(); - app.UseStaticFiles(); - - app.UseOpenApi(); - - app.UseDALMiddleware(); - app.UseJwtMiddleware(); - app.ConfigureSwagger(); - - app.UseEndpoints(endpoints => - { - endpoints.MapControllers(); - }); - } - } -} \ No newline at end of file diff --git a/StaffDBServer/local.db b/StaffDBServer/local.db deleted file mode 100644 index d7536743d235fcb7c042e5e0e619976a75c32a02..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8192 zcmeIuJqp5548ZZc;wtt6g^aqmcmb<)D~Q?)RD8-q`@!Qa9lVtX)PjX>-Q^z$2}#KC zJ0Eiwtlk=5l|eTWi!riQ6_IF^=GV`@b%=g86_KnDuX%qJi!9z#=j;(c009ILKmY** z5I_I{1Q0-AB#