From 9067d8dece00e5e36aa2d3df1eae25dc00bd5fb9 Mon Sep 17 00:00:00 2001 From: Sergey Karmanov Date: Sun, 16 Jun 2024 18:04:59 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=D0=B1=D0=BE=D0=BB=D1=8C=D1=88?= =?UTF-8?q?=D0=B8=D0=B5=20=D1=84=D0=B8=D0=BA=D1=81=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 + .../HackathonPreparing.ApiService/Program.cs | 12 ------ .../HackathonPreparing/HackathonPreparing.sln | 43 ------------------- 3 files changed, 2 insertions(+), 55 deletions(-) delete mode 100644 HackathonPreparing/HackathonPreparing/HackathonPreparing.sln diff --git a/.gitignore b/.gitignore index fdbd58e..f3a3320 100644 --- a/.gitignore +++ b/.gitignore @@ -491,3 +491,5 @@ fabric.properties # Android studio 3.1+ serialized cache file .idea/caches/build_file_checksums.ser + +HackathonPreparing/.idea/.idea.HackathonPreparing/.idea/ diff --git a/HackathonPreparing/HackathonPreparing/HackathonPreparing.ApiService/Program.cs b/HackathonPreparing/HackathonPreparing/HackathonPreparing.ApiService/Program.cs index dad49dc..4907c6a 100644 --- a/HackathonPreparing/HackathonPreparing/HackathonPreparing.ApiService/Program.cs +++ b/HackathonPreparing/HackathonPreparing/HackathonPreparing.ApiService/Program.cs @@ -1,11 +1,9 @@ -using System.Diagnostics; using HackathonPreparing.ApiService; using Microsoft.EntityFrameworkCore; using Microsoft.OpenApi.Models; var builder = WebApplication.CreateBuilder(args); - builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwaggerGen(c => { @@ -21,21 +19,14 @@ builder.AddServiceDefaults(); // Add services to the container. builder.Services.AddProblemDetails(); - builder.AddNpgsqlDbContext("prod", null, optionsBuilder => optionsBuilder.UseNpgsql(npgsqlBuilder => npgsqlBuilder.MigrationsAssembly(typeof(Program).Assembly.GetName().Name))); var app = builder.Build(); - var logger = app.Services.GetRequiredService>(); - - - - - if (app.Environment.IsDevelopment()) { logger.LogWarning("!!!!!!! Call /ensure-created enpoint or /migrate if no db !!!!!!!!"); @@ -52,9 +43,6 @@ if (app.Environment.IsDevelopment()) // Configure the HTTP request pipeline. app.UseExceptionHandler(); - - - app.MapGet("/weatherforecast", async (DatabaseContext db) => await db.Forecasts.ToListAsync()); app.MapDefaultEndpoints(); diff --git a/HackathonPreparing/HackathonPreparing/HackathonPreparing.sln b/HackathonPreparing/HackathonPreparing/HackathonPreparing.sln deleted file mode 100644 index 76f05c5..0000000 --- a/HackathonPreparing/HackathonPreparing/HackathonPreparing.sln +++ /dev/null @@ -1,43 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.5.002.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HackathonPreparing.ApiService", "HackathonPreparing.ApiService\HackathonPreparing.ApiService.csproj", "{DF197643-F98E-43D0-8C93-78C27D11CB26}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HackathonPreparing.AppHost", "HackathonPreparing.AppHost\HackathonPreparing.AppHost.csproj", "{DD3AB30E-1CB0-4E60-B513-7BBA4A0EA7B0}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HackathonPreparing.ServiceDefaults", "HackathonPreparing.ServiceDefaults\HackathonPreparing.ServiceDefaults.csproj", "{29EC9110-27F1-45F9-A351-8EF6A12A1D5C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HackathonPreparing.Web", "HackathonPreparing.Web\HackathonPreparing.Web.csproj", "{164763E8-DED7-4C3C-8F36-095CB4F863C7}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {DF197643-F98E-43D0-8C93-78C27D11CB26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DF197643-F98E-43D0-8C93-78C27D11CB26}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DF197643-F98E-43D0-8C93-78C27D11CB26}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DF197643-F98E-43D0-8C93-78C27D11CB26}.Release|Any CPU.Build.0 = Release|Any CPU - {DD3AB30E-1CB0-4E60-B513-7BBA4A0EA7B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DD3AB30E-1CB0-4E60-B513-7BBA4A0EA7B0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DD3AB30E-1CB0-4E60-B513-7BBA4A0EA7B0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DD3AB30E-1CB0-4E60-B513-7BBA4A0EA7B0}.Release|Any CPU.Build.0 = Release|Any CPU - {29EC9110-27F1-45F9-A351-8EF6A12A1D5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {29EC9110-27F1-45F9-A351-8EF6A12A1D5C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {29EC9110-27F1-45F9-A351-8EF6A12A1D5C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {29EC9110-27F1-45F9-A351-8EF6A12A1D5C}.Release|Any CPU.Build.0 = Release|Any CPU - {164763E8-DED7-4C3C-8F36-095CB4F863C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {164763E8-DED7-4C3C-8F36-095CB4F863C7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {164763E8-DED7-4C3C-8F36-095CB4F863C7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {164763E8-DED7-4C3C-8F36-095CB4F863C7}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {80C5F09A-371B-4BC1-9514-36F72E4A64F9} - EndGlobalSection -EndGlobal