diff --git a/Controllers/BundleController.cs b/Controllers/BundleController.cs index 8ec1030..d8d2512 100644 --- a/Controllers/BundleController.cs +++ b/Controllers/BundleController.cs @@ -1,4 +1,5 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; using MyDarling.Models; namespace MyDarling.Controllers @@ -10,9 +11,9 @@ namespace MyDarling.Controllers { this.context = context; } - public async Task Show(int id) + public IActionResult Show(int id) { - return View(await context.UnderwearBundles.FindAsync(id)); + return View(context.UnderwearBundles.Include(x => x.Figures).Where(x => x.Id == id).FirstOrDefault()); } } } \ No newline at end of file diff --git a/Views/Bundle/Show.cshtml b/Views/Bundle/Show.cshtml index 8d3e055..fe6ce88 100644 --- a/Views/Bundle/Show.cshtml +++ b/Views/Bundle/Show.cshtml @@ -1,14 +1,62 @@ - - - - - - @Model?.Name - - - -

@Model?.Name

-

@Model?.Description

- - - +@model MyDarling.Models.UnderwearBundle; +@{ + Layout = "_Layout"; +} + +
+
+
+
+ +
+
+

@Model?.Name

+

@Model?.Description

+
+
+
+
\ No newline at end of file diff --git a/Views/Home/Index.cshtml b/Views/Home/Index.cshtml index 71e16da..2db557c 100644 --- a/Views/Home/Index.cshtml +++ b/Views/Home/Index.cshtml @@ -1,191 +1,167 @@ @model IQueryable; - - - - - - - - - - My Darling Underwear - - - - - - - - + +
+
+
+
+ +

>Нижнее бельё ручной работы по индивидуальным меркам

+ Узнать больше
- - -
-
-
-
- -

Нижнее бельё ручной работы по индивидуальным меркам

- Узнать больше -
+
+
+ +
+
+
+
+

Built with Bootstrap 5

+

+ Grayscale is a free Bootstrap theme created by Start Bootstrap. It can be yours right now, + simply download the template on + the preview page. + The theme is open source, and you can use it for any purpose, personal or commercial. +

- - -
-
-
-
-

Built with Bootstrap 5

-

- Grayscale is a free Bootstrap theme created by Start Bootstrap. It can be yours right now, - simply download the template on - the preview page. - The theme is open source, and you can use it for any purpose, personal or commercial. -

-
-
- ... -
-
- -
-
-
- @foreach (var bundle in @Model) - { -
-
- ... -
-
-
@bundle.Name
- @bundle.Price.ToString("c0") -
+ ... +
+
+ +
+
+
+ @foreach (var bundle in @Model) + { +
+
+ ... +
+
+
@bundle.Name
+ @bundle.Price.ToString("c0")
- } -
-
-
- - - -
-
-
-
-
-
- -

Address

-
-
4923 Market Street, Orlando FL
+
+
+ + + +
+
+
+
+
+
+ +

Address

+
+
4923 Market Street, Orlando FL
- -
- -
-
© My Darling Underwear 2023
-
- - - - - - - \ No newline at end of file + +
+
\ No newline at end of file diff --git a/Views/Shared/_Layout.cshtml b/Views/Shared/_Layout.cshtml new file mode 100644 index 0000000..e685f8d --- /dev/null +++ b/Views/Shared/_Layout.cshtml @@ -0,0 +1,26 @@ + + + + + + + + + Grayscale - Start Bootstrap Theme + + + + + + + @RenderBody() +
+
© My Darling underwear 2023
+
+ + + + + + + \ No newline at end of file diff --git a/libman.json b/libman.json index c15368e..ceee271 100644 --- a/libman.json +++ b/libman.json @@ -1,10 +1,5 @@ { "version": "1.0", "defaultProvider": "cdnjs", - "libraries": [ - { - "library": "bootstrap@5.2.3", - "destination": "wwwroot/lib/bootstrap" - } - ] + "libraries": [] } \ No newline at end of file