From b64b41b9cf7c1142c5b2b2cf3c1fa7f7227488aa Mon Sep 17 00:00:00 2001 From: antoc0der <1@DESKTOP-K1L8ND3> Date: Sun, 21 Apr 2024 21:02:02 +0400 Subject: [PATCH] =?UTF-8?q?=D1=87=D1=82=D0=BE=20=D0=B5=D1=81=D1=82=D1=8C?= =?UTF-8?q?=20=D1=82=D0=BE=20=D0=B5=D1=81=D1=82=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BindingModels/ShopBindingModel.cs | 4 ++-- FlowerShopsApp/Program.cs | 3 +++ FlowerShopsApp/Views/Shared/_Layout.cshtml | 13 +++++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/FlowerShopContracts/BindingModels/ShopBindingModel.cs b/FlowerShopContracts/BindingModels/ShopBindingModel.cs index 2298fa6..e8f8210 100644 --- a/FlowerShopContracts/BindingModels/ShopBindingModel.cs +++ b/FlowerShopContracts/BindingModels/ShopBindingModel.cs @@ -10,8 +10,8 @@ namespace FlowerShopContracts.BindingModels public class ShopBindingModel : IShopModel { public int Id { get; set; } - public string ShopName { get; set; } - public string Address { get; set; } + public string ShopName { get; set; } = string.Empty; + public string Address { get; set; } = string.Empty; public DateTime DateOpen { get; set; } public int MaxCapacity { get; set; } public Dictionary ShopFlowers { get; set; } = new(); diff --git a/FlowerShopsApp/Program.cs b/FlowerShopsApp/Program.cs index 559dd3a..a88dc13 100644 --- a/FlowerShopsApp/Program.cs +++ b/FlowerShopsApp/Program.cs @@ -1,9 +1,12 @@ +using FlowerShopsApp; + var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddControllersWithViews(); var app = builder.Build(); +ApiClient.Connect(builder.Configuration); // Configure the HTTP request pipeline. if (!app.Environment.IsDevelopment()) diff --git a/FlowerShopsApp/Views/Shared/_Layout.cshtml b/FlowerShopsApp/Views/Shared/_Layout.cshtml index caf0701..dc7d9a8 100644 --- a/FlowerShopsApp/Views/Shared/_Layout.cshtml +++ b/FlowerShopsApp/Views/Shared/_Layout.cshtml @@ -20,10 +20,19 @@