summaryrefslogtreecommitdiff
path: root/Controllers/HomeController.cs
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2023-02-16 07:23:48 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2023-02-16 07:23:48 +0300
commitaf72b18ba097310f55152ee0f1654fe4df6dea89 (patch)
tree462107ea8e4e1b78c1b9e18767c10f4e66f240d4 /Controllers/HomeController.cs
parent3e8118838b43865b9707e2c52738835fda04d48a (diff)
MyDarlingRepository DI
Diffstat (limited to 'Controllers/HomeController.cs')
-rw-r--r--Controllers/HomeController.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Controllers/HomeController.cs b/Controllers/HomeController.cs
index 255af9f..228a9c3 100644
--- a/Controllers/HomeController.cs
+++ b/Controllers/HomeController.cs
@@ -6,14 +6,14 @@ namespace MyDarling.Controllers
{
public class HomeController : Controller
{
- private DataContext context;
- public HomeController(DataContext context)
+ private IRepository repository;
+ public HomeController(IRepository repository)
{
- this.context = context;
+ this.repository = repository;
}
public IActionResult Index()
{
- return View(context.UnderwearBundles.Include(bundle => bundle.Figures).Where(x => x.Price != 0));
+ return View(repository);
}
}
} \ No newline at end of file