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 @@