From fb98928ef9642d960311244c4cd4cc3637be6707 Mon Sep 17 00:00:00 2001 From: frog24 Date: Thu, 16 May 2024 21:20:15 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BC=D0=B5=D0=B8=D0=BB=D1=8B=20=D1=81=D0=BB?= =?UTF-8?q?=D0=BE=D0=BC=D0=B0=D0=BB=D0=B8=20=D0=BC=D0=BD=D0=B5=20=D0=BB?= =?UTF-8?q?=D0=B0=D0=B1=D1=83=20=D1=81=D0=B2=D0=BE=D0=B8=D0=BC=20=D1=81?= =?UTF-8?q?=D0=BF=D0=B0=D0=BC=D0=BE=D0=BC)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/HomeController.cs | 3 +-- .../ComputersShopClientApp/Views/Home/Mails.cshtml | 11 ++++------- ...ime.Designer.cs => 20240516145540_fix.Designer.cs} | 4 ++-- ...40502193720_FirstTime.cs => 20240516145540_fix.cs} | 2 +- ComputersShop/ComputersShopRestApi/Program.cs | 2 +- 5 files changed, 9 insertions(+), 13 deletions(-) rename ComputersShop/ComputersShopDatabaseImplements/Migrations/{20240502193720_FirstTime.Designer.cs => 20240516145540_fix.Designer.cs} (99%) rename ComputersShop/ComputersShopDatabaseImplements/Migrations/{20240502193720_FirstTime.cs => 20240516145540_fix.cs} (99%) diff --git a/ComputersShop/ComputersShopClientApp/Controllers/HomeController.cs b/ComputersShop/ComputersShopClientApp/Controllers/HomeController.cs index a6d8374..5548be4 100644 --- a/ComputersShop/ComputersShopClientApp/Controllers/HomeController.cs +++ b/ComputersShop/ComputersShopClientApp/Controllers/HomeController.cs @@ -147,8 +147,7 @@ namespace ComputersShopClientApp.Controllers { return Redirect("~/Home/Enter"); } - return - View(APIClient.GetRequest>($"api/client/getmessages?clientId={APIClient.Client.Id}")); + return View(APIClient.GetRequest>($"api/client/getmessages?clientId={APIClient.Client.Id}")); } } } \ No newline at end of file diff --git a/ComputersShop/ComputersShopClientApp/Views/Home/Mails.cshtml b/ComputersShop/ComputersShopClientApp/Views/Home/Mails.cshtml index 82864e9..0308754 100644 --- a/ComputersShop/ComputersShopClientApp/Views/Home/Mails.cshtml +++ b/ComputersShop/ComputersShopClientApp/Views/Home/Mails.cshtml @@ -7,7 +7,7 @@ }
-

Заказы

+

Письма

@@ -36,16 +36,13 @@ { - @Html.DisplayFor(modelItem => - item.DateDelivery) + @Html.DisplayFor(modelItem => item.DateDelivery) - @Html.DisplayFor(modelItem => - item.Subject) + @Html.DisplayFor(modelItem => item.Subject) - @Html.DisplayFor(modelItem => - item.Body) + @Html.DisplayFor(modelItem => item.Body) } diff --git a/ComputersShop/ComputersShopDatabaseImplements/Migrations/20240502193720_FirstTime.Designer.cs b/ComputersShop/ComputersShopDatabaseImplements/Migrations/20240516145540_fix.Designer.cs similarity index 99% rename from ComputersShop/ComputersShopDatabaseImplements/Migrations/20240502193720_FirstTime.Designer.cs rename to ComputersShop/ComputersShopDatabaseImplements/Migrations/20240516145540_fix.Designer.cs index d048c08..bcc0f36 100644 --- a/ComputersShop/ComputersShopDatabaseImplements/Migrations/20240502193720_FirstTime.Designer.cs +++ b/ComputersShop/ComputersShopDatabaseImplements/Migrations/20240516145540_fix.Designer.cs @@ -12,8 +12,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace ComputersShopDatabaseImplements.Migrations { [DbContext(typeof(ComputersShopDatabase))] - [Migration("20240502193720_FirstTime")] - partial class FirstTime + [Migration("20240516145540_fix")] + partial class fix { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) diff --git a/ComputersShop/ComputersShopDatabaseImplements/Migrations/20240502193720_FirstTime.cs b/ComputersShop/ComputersShopDatabaseImplements/Migrations/20240516145540_fix.cs similarity index 99% rename from ComputersShop/ComputersShopDatabaseImplements/Migrations/20240502193720_FirstTime.cs rename to ComputersShop/ComputersShopDatabaseImplements/Migrations/20240516145540_fix.cs index 1f3b337..14bf360 100644 --- a/ComputersShop/ComputersShopDatabaseImplements/Migrations/20240502193720_FirstTime.cs +++ b/ComputersShop/ComputersShopDatabaseImplements/Migrations/20240516145540_fix.cs @@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations; namespace ComputersShopDatabaseImplements.Migrations { /// - public partial class FirstTime : Migration + public partial class fix : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) diff --git a/ComputersShop/ComputersShopRestApi/Program.cs b/ComputersShop/ComputersShopRestApi/Program.cs index 7723341..208b1df 100644 --- a/ComputersShop/ComputersShopRestApi/Program.cs +++ b/ComputersShop/ComputersShopRestApi/Program.cs @@ -24,7 +24,7 @@ builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); -builder.Services.AddTransient(); +builder.Services.AddSingleton(); builder.Services.AddControllers(); // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle