From b86579ea3f7524a0c64e1f8b40f4c7cf313f6886 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Mon, 6 Feb 2023 21:32:40 +0300 Subject: Add base carousel --- Controllers/BundleController.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Controllers/BundleController.cs') 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 -- cgit v1.2.3