From 910bb1d727b8615aba70e122b4ae6e51d015b596 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Wed, 1 Feb 2023 09:30:01 +0300 Subject: Add bundle cards --- Controllers/HomeController.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Controllers/HomeController.cs') 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 -- cgit v1.2.3