0
0

Delete bundle controller

This commit is contained in:
Sergey Chebotar 2023-02-10 08:08:07 +03:00
parent 3f6a044a38
commit abe2ba567a
2 changed files with 0 additions and 62 deletions

View File

@ -1,19 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using MyDarling.Models;
namespace MyDarling.Controllers
{
public class BundleController : Controller
{
private DataContext context;
public BundleController(DataContext context)
{
this.context = context;
}
public IActionResult Show(int id)
{
return View(context.UnderwearBundles.Include(x => x.Figures).Where(x => x.Id == id).FirstOrDefault());
}
}
}

View File

@ -1,43 +0,0 @@
@model MyDarling.Models.UnderwearBundle;
<!DOCTYPE html>
<html lang="ru-RU">
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css">
</head>
<body>
<div id="carouselIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselIndicators" data-slide-to="0" class="active"></li>
@for (int i = 1; i < @Model?.Figures.Count(); i++)
{
<li data-target="#carouselIndicators" data-slide-to="@i"></li>
}
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<img class="d-block w-100" src="@Model?.Figures[0].FilePath" alt="...">
</div>
@for (int i = 1; i < @Model?.Figures.Count(); i++)
{
<div class="carousel-item">
<img class="d-block w-100" src="@Model?.Figures[i].FilePath" alt="...">
</div>
}
</div>
<a class="carousel-control-prev" href="#carouselIndicators" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselIndicators" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.12.9/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/js/bootstrap.min.js"></script>
</body>
</html>