diff --git a/ComputerHardwareStore/ComputerHardwareStore.sln b/ComputerHardwareStore/ComputerHardwareStore.sln index d80e1f5..ac65d69 100644 --- a/ComputerHardwareStore/ComputerHardwareStore.sln +++ b/ComputerHardwareStore/ComputerHardwareStore.sln @@ -15,6 +15,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputerHardwareStoreDataba EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputerHardwareStoreREST", "ComputerHardwareStoreREST\ComputerHardwareStoreREST.csproj", "{20E4D287-C0F4-4DAB-B338-349F8B6EA22B}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StoreKeeperClient", "ComputerHardwareStoreStoreKeeperApp\StoreKeeperClient.csproj", "{0FF8FE3D-A38E-40AF-9286-4D7B11ADA785}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -45,6 +47,10 @@ Global {20E4D287-C0F4-4DAB-B338-349F8B6EA22B}.Debug|Any CPU.Build.0 = Debug|Any CPU {20E4D287-C0F4-4DAB-B338-349F8B6EA22B}.Release|Any CPU.ActiveCfg = Release|Any CPU {20E4D287-C0F4-4DAB-B338-349F8B6EA22B}.Release|Any CPU.Build.0 = Release|Any CPU + {0FF8FE3D-A38E-40AF-9286-4D7B11ADA785}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0FF8FE3D-A38E-40AF-9286-4D7B11ADA785}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0FF8FE3D-A38E-40AF-9286-4D7B11ADA785}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0FF8FE3D-A38E-40AF-9286-4D7B11ADA785}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/ComputerHardwareStoreStoreKeeperApp.http b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/ComputerHardwareStoreStoreKeeperApp.http new file mode 100644 index 0000000..2523011 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/ComputerHardwareStoreStoreKeeperApp.http @@ -0,0 +1,6 @@ +@ComputerHardwareStoreStoreKeeperApp_HostAddress = http://localhost:5062 + +GET {{ComputerHardwareStoreStoreKeeperApp_HostAddress}}/weatherforecast/ +Accept: application/json + +### diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Program.cs b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Program.cs new file mode 100644 index 0000000..cb880ed --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Program.cs @@ -0,0 +1,49 @@ +using ComputerHardwareStoreContracts.BusinessLogicsContracts; +using ComputerHardwareStoreContracts.StorageContracts; +using ComputerHardwareStoreDatabaseImplement.Implements; +using ComputerHardwareStoreBusinessLogic.BusinessLogic; + +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. + +builder.Services.AddControllersWithViews(); + +builder.Logging.SetMinimumLevel(LogLevel.Trace); + +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); +builder.Services.AddTransient(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (app.Environment.IsDevelopment()) +{ + app.UseSwagger(); + app.UseSwaggerUI(); +} + +app.UseHttpsRedirection(); +app.UseStaticFiles(); + +app.UseRouting(); + +app.UseAuthorization(); + +app.MapControllerRoute( + name: "default", + pattern: "{controller=Home}/{action=Index}/{id?}"); + +app.Run(); diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Properties/launchSettings.json b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Properties/launchSettings.json new file mode 100644 index 0000000..4e32c5d --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Properties/launchSettings.json @@ -0,0 +1,41 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:34433", + "sslPort": 44361 + } + }, + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "http://localhost:5062", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "https://localhost:7291;http://localhost:5062", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/StoreKeeperClient.csproj b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/StoreKeeperClient.csproj new file mode 100644 index 0000000..716311a --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/StoreKeeperClient.csproj @@ -0,0 +1,23 @@ + + + + net8.0 + enable + enable + + + + + + + + + + + + + + + + + diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/BuildByProductsReport.cshtml b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/BuildByProductsReport.cshtml new file mode 100644 index 0000000..7d275a7 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/BuildByProductsReport.cshtml @@ -0,0 +1,53 @@ +@using ComputerHardwareStoreContracts.ViewModels +@model List +@{ + ViewData["Title"] = "BuildsByProductsReport"; +} +
+

Сборки по товарам

+
+
+
+ @{ + if (Model == null) + { +

Войдите в профиль

+ return; + } +
+
Формат сохранения:
+
+ + + + +
+
+
+
Выберите файл:
+
+ + +
+
+
+
Выберите товары:
+
+ +
+
+
+
+
+
+ +
+
+ } +
+
diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/ComponentToBuild.cshtml b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/ComponentToBuild.cshtml new file mode 100644 index 0000000..69fa453 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/ComponentToBuild.cshtml @@ -0,0 +1,29 @@ +@{ + ViewData["Title"] = "ComponentToBuild"; +} +
+

Добавить комплектующие в сборку

+
+
+
+
Сборка:
+
+ +
+
+
+
Комплектующее:
+
+ +
+
+
+
Количество:
+
+ +
+
+
+ +
+
\ No newline at end of file diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/Components.cshtml b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/Components.cshtml new file mode 100644 index 0000000..764d376 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/Components.cshtml @@ -0,0 +1,58 @@ +@using ComputerHardwareStoreContracts.ViewModels +@model List +@{ + ViewData["Title"] = "Components"; +} +
+

Комплектующие

+
+
+ @{ + if (Model == null) + { +

Войдите в профиль!

+ return; + } +

+ Создать комплектующее + Изменить комплектующее + Привязать комплектующее к сборке + Удалить комплектующее +

+ + + + + + + + + + + + + @foreach (var component in Model) + { + + + + + + } + + +
+ Номер + + Название + + Цена +
+ @Html.DisplayFor(modelItem => component.Id) + + @Html.DisplayFor(modelItem => component.ComponentName) + + @Html.DisplayFor(modelItem => component.ComponentPrice) +
+ } +
diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/ComponentsByPurchasesAndOrdersReport.cshtml b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/ComponentsByPurchasesAndOrdersReport.cshtml new file mode 100644 index 0000000..3b58763 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/ComponentsByPurchasesAndOrdersReport.cshtml @@ -0,0 +1,58 @@ +@using ComputerHardwareStoreContracts.ViewModels +@model List +@{ + ViewData["Title"] = "ComponentsByPurchasesAndOrdersReport"; +} +
+

Отчёт по комплектующим

+
+
+
+ @{ + if (Model == null) + { +

Войдите в профиль

+ return; + } +
+
Формат получения:
+
+ + + + +
+
+
+
Начальная дата:
+
+ +
+
+
+
Конечная дата:
+
+ +
+
+
+
Выберите комплектующие:
+
+ +
+
+
+
+
+
+ +
+
+ } +
+
diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/CreateComponent.cshtml b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/CreateComponent.cshtml new file mode 100644 index 0000000..a468ae2 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/CreateComponent.cshtml @@ -0,0 +1,25 @@ +@{ + ViewData["Title"] = "CreateComponent"; +} +
+

Создать комплектующее

+
+
+ +
+
Название:
+
+
+
+
Цена:
+
+
+
+
+
+
+ +
+
+ +
diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/CreateOrder.cshtml b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/CreateOrder.cshtml new file mode 100644 index 0000000..fa046d2 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/CreateOrder.cshtml @@ -0,0 +1,29 @@ +@{ + ViewData["Title"] = "CreateOrder"; +} +
+

Создать заказ

+
+
+
+
Дата:
+
+
+
+
Адрес доставки:
+
+
+
+
Товар:
+
+ +
+
+
+
+
+
+ +
+
+
diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/CreateProduct.cshtml b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/CreateProduct.cshtml new file mode 100644 index 0000000..27fde07 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/CreateProduct.cshtml @@ -0,0 +1,36 @@ +@using ComputerHardwareStoreContracts.ViewModels +@model List +@{ + ViewData["Title"] = "CreateProduct"; +} +
+

Создать товар

+
+
+
+
Название:
+
+
+
+
Цена:
+
+
+
+
Комплектующие:
+
+ +
+
+
+
+
+
+ +
+
+
diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/DeleteComponent.cshtml b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/DeleteComponent.cshtml new file mode 100644 index 0000000..218fdc9 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/DeleteComponent.cshtml @@ -0,0 +1,17 @@ +@{ + ViewData["Title"] = "DeleteComponent"; +} +
+

Удалить комплектующее

+
+
+
+
Название:
+
+ +
+
+
+ +
+
diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/DeleteOrder.cshtml b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/DeleteOrder.cshtml new file mode 100644 index 0000000..5941fd8 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/DeleteOrder.cshtml @@ -0,0 +1,17 @@ +@{ + ViewData["Title"] = "DeleteOrder"; +} +
+

Удалить заказ

+
+
+
+
Заказ:
+
+ +
+
+
+ +
+
diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/DeleteProduct.cshtml b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/DeleteProduct.cshtml new file mode 100644 index 0000000..378839e --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/DeleteProduct.cshtml @@ -0,0 +1,17 @@ +@{ + ViewData["Title"] = "DeleteProduct"; +} +
+

Удалить комплектующее

+
+
+
+
Название:
+
+ +
+
+
+ +
+
diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/Enter.cshtml b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/Enter.cshtml new file mode 100644 index 0000000..e574d32 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/Enter.cshtml @@ -0,0 +1,20 @@ +@{ + ViewData["Title"] = "Enter"; +} +
+

Вход в приложение

+
+
+
+
Логин:
+
+
+
+
Пароль:
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/Index.cshtml b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/Index.cshtml new file mode 100644 index 0000000..238ffb8 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/Index.cshtml @@ -0,0 +1,7 @@ +@{ + ViewData["Title"] = "Home Page"; +} + +
+ logo +
diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/Orders.cshtml b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/Orders.cshtml new file mode 100644 index 0000000..e06b0d2 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/Orders.cshtml @@ -0,0 +1,57 @@ +@using ComputerHardwareStoreContracts.ViewModels +@model List +@{ + ViewData["Title"] = "Orders"; +} +
+

Заказы на товары

+
+
+ @{ + if (Model == null) + { +

Надо войти!

+ return; + } +

+ Создать заказ + Изменить заказ + Удалить заказе +

+ + + + + + + + + + + + + @foreach (var order in Model) + { + + + + + + } + + +
+ Номер + + Дата создания + + Дата выполнения +
+ @Html.DisplayFor(modelItem => order.Id) + + @Html.DisplayFor(modelItem => order.DateCreate) + + @Html.DisplayFor(modelItem => order.DateImplemet) +
+ } +
diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/Products.cshtml b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/Products.cshtml new file mode 100644 index 0000000..6a028f6 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/Products.cshtml @@ -0,0 +1,58 @@ +@using ComputerHardwareStoreContracts.ViewModels +@model List +@{ + ViewData["Title"] = "Products"; +} +
+

Товары

+
+
+ @{ + if (Model == null) + { +

Надо войти!

+ return; + } +

+ Создать товар + Изменить товар + Удалить товар +

+ + + + + + + + + + + + + @foreach (var Product in Model) + { + + + + + + } + + +
+ Номер + + Название + + Цена +
+ @Html.DisplayFor(modelItem => Product.Id) + + @Html.DisplayFor(modelItem => Product.Name) + + @Html.DisplayFor(modelItem => Product.Price) +
+ } +
+ diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/Register.cshtml b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/Register.cshtml new file mode 100644 index 0000000..a12fd58 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/Register.cshtml @@ -0,0 +1,25 @@ +@{ + ViewData["Title"] = "Register"; +} +
+

Регистрация

+
+
+
+
ФИО:
+
+
+
+
Логин:
+
+
+
+
Пароль:
+
+
+
+
+
+
+
diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/UpdateComponent.cshtml b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/UpdateComponent.cshtml new file mode 100644 index 0000000..f1bbb6b --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/UpdateComponent.cshtml @@ -0,0 +1,52 @@ +@{ + ViewData["Title"] = "UpdateComponent"; +} +
+

Изменить комплектующее

+
+
+
+
комплектующее:
+
+ +
+
+
+
Название:
+
+
+
+
Цена:
+
+
+ +
+ +
+
+< \ No newline at end of file diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/UpdateOrder.cshtml b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/UpdateOrder.cshtml new file mode 100644 index 0000000..e020a41 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/UpdateOrder.cshtml @@ -0,0 +1,46 @@ +@{ + ViewData["Title"] = "UpdateOrder"; +} +
+

Обновить заказ

+
+
+
+
Заказ:
+
+ +
+
+
+
Дата:
+
+
+
+
Товар:
+
+ +
+
+
+ +
+
+< diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/UpdateProduct.cshtml b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/UpdateProduct.cshtml new file mode 100644 index 0000000..3ee280a --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/Views/Home/UpdateProduct.cshtml @@ -0,0 +1,69 @@ +@{ + ViewData["Title"] = "UpdateProduct"; +} +
+

Обновить покупку

+
+
+
+
Покупка:
+
+ +
+
+
+
Название:
+
+
+
+
Цена:
+
+
+ +
+
Комплектующие в товаре:
+
+ + + + + + + + + +
НазваниеКоличество
+
+
+ +
+ +
+
+< diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/appsettings.Development.json b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/appsettings.Development.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/appsettings.json b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreStoreKeeperApp/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/ComputerHardwareStore/WebApplication1/Controllers/WeatherForecastController.cs b/ComputerHardwareStore/WebApplication1/Controllers/WeatherForecastController.cs new file mode 100644 index 0000000..8e0ea76 --- /dev/null +++ b/ComputerHardwareStore/WebApplication1/Controllers/WeatherForecastController.cs @@ -0,0 +1,33 @@ +using Microsoft.AspNetCore.Mvc; + +namespace WebApplication1.Controllers +{ + [ApiController] + [Route("[controller]")] + public class WeatherForecastController : ControllerBase + { + private static readonly string[] Summaries = new[] + { + "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" + }; + + private readonly ILogger _logger; + + public WeatherForecastController(ILogger logger) + { + _logger = logger; + } + + [HttpGet(Name = "GetWeatherForecast")] + public IEnumerable Get() + { + return Enumerable.Range(1, 5).Select(index => new WeatherForecast + { + Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)), + TemperatureC = Random.Shared.Next(-20, 55), + Summary = Summaries[Random.Shared.Next(Summaries.Length)] + }) + .ToArray(); + } + } +} diff --git a/ComputerHardwareStore/WebApplication1/Program.cs b/ComputerHardwareStore/WebApplication1/Program.cs new file mode 100644 index 0000000..48863a6 --- /dev/null +++ b/ComputerHardwareStore/WebApplication1/Program.cs @@ -0,0 +1,25 @@ +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. + +builder.Services.AddControllers(); +// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle +builder.Services.AddEndpointsApiExplorer(); +builder.Services.AddSwaggerGen(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (app.Environment.IsDevelopment()) +{ + app.UseSwagger(); + app.UseSwaggerUI(); +} + +app.UseHttpsRedirection(); + +app.UseAuthorization(); + +app.MapControllers(); + +app.Run(); diff --git a/ComputerHardwareStore/WebApplication1/Properties/launchSettings.json b/ComputerHardwareStore/WebApplication1/Properties/launchSettings.json new file mode 100644 index 0000000..55337e7 --- /dev/null +++ b/ComputerHardwareStore/WebApplication1/Properties/launchSettings.json @@ -0,0 +1,41 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:19732", + "sslPort": 44357 + } + }, + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "http://localhost:5174", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "https://localhost:7272;http://localhost:5174", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/ComputerHardwareStore/WebApplication1/WeatherForecast.cs b/ComputerHardwareStore/WebApplication1/WeatherForecast.cs new file mode 100644 index 0000000..6514c01 --- /dev/null +++ b/ComputerHardwareStore/WebApplication1/WeatherForecast.cs @@ -0,0 +1,13 @@ +namespace WebApplication1 +{ + public class WeatherForecast + { + public DateOnly Date { get; set; } + + public int TemperatureC { get; set; } + + public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); + + public string? Summary { get; set; } + } +} diff --git a/ComputerHardwareStore/WebApplication1/WebApplication1.csproj b/ComputerHardwareStore/WebApplication1/WebApplication1.csproj new file mode 100644 index 0000000..9daa180 --- /dev/null +++ b/ComputerHardwareStore/WebApplication1/WebApplication1.csproj @@ -0,0 +1,13 @@ + + + + net8.0 + enable + enable + + + + + + + diff --git a/ComputerHardwareStore/WebApplication1/WebApplication1.http b/ComputerHardwareStore/WebApplication1/WebApplication1.http new file mode 100644 index 0000000..1043526 --- /dev/null +++ b/ComputerHardwareStore/WebApplication1/WebApplication1.http @@ -0,0 +1,6 @@ +@WebApplication1_HostAddress = http://localhost:5174 + +GET {{WebApplication1_HostAddress}}/weatherforecast/ +Accept: application/json + +### diff --git a/ComputerHardwareStore/WebApplication1/appsettings.Development.json b/ComputerHardwareStore/WebApplication1/appsettings.Development.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/ComputerHardwareStore/WebApplication1/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/ComputerHardwareStore/WebApplication1/appsettings.json b/ComputerHardwareStore/WebApplication1/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/ComputerHardwareStore/WebApplication1/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +}