From 910bb1d727b8615aba70e122b4ae6e51d015b596 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Wed, 1 Feb 2023 09:30:01 +0300 Subject: [PATCH] Add bundle cards --- Controllers/HomeController.cs | 9 +- Views/Home/Index.cshtml | 355 +++++++++++++++++----------------- 2 files changed, 183 insertions(+), 181 deletions(-) diff --git a/Controllers/HomeController.cs b/Controllers/HomeController.cs index a9cdaa5..255af9f 100644 --- a/Controllers/HomeController.cs +++ b/Controllers/HomeController.cs @@ -1,12 +1,19 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using MyDarling.Models; namespace MyDarling.Controllers { public class HomeController : Controller { + private DataContext context; + public HomeController(DataContext context) + { + this.context = context; + } public IActionResult Index() { - return View(); + return View(context.UnderwearBundles.Include(bundle => bundle.Figures).Where(x => x.Price != 0)); } } } \ No newline at end of file diff --git a/Views/Home/Index.cshtml b/Views/Home/Index.cshtml index ed951ea..8149c41 100644 --- a/Views/Home/Index.cshtml +++ b/Views/Home/Index.cshtml @@ -1,197 +1,192 @@ +@model IQueryable; + - - - - - - Grayscale - Start Bootstrap Theme - - - - - - - - -
-
-
-
-

Grayscale

-

A free, responsive, one page Bootstrap theme created by Start Bootstrap.

- Get Started -
+
+
+ +
+
+
+
+

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

-
-
- ... -
-
- -
-
- -
-
...
-
- -
-
- -
-
...
-
-
-
-
-

Misty

-

An example of where you can put an image of a project, or anything else, along with a description.

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

Mountains

-

Another example of a project with its respective description. These sections work well responsively as well, try this theme on a small screen!

-
-
+ } +
+
+
+ + + +
+
+
+
+
+
+ +

Address

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

Email

+
+ +
+
+
+
+
+
+ +

Phone

+
+
+1 (555) 902-8832
+
-
- - - -
-
-
-
-
-
- -

Address

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

Email

-
- -
-
-
-
-
-
- -

Phone

-
-
+1 (555) 902-8832
-
-
-
-
- -
-
- -
Copyright © Your Website 2022
- - - - - +
+
+ +
+
Copyright © Your Website 2022
+
+ + + + + + \ No newline at end of file