@model CleanMVC.Application.DTOs.ProductDTO

<h3>Product Details</h3>
<div>
    <hr />
    <dl class="row">
        <dt class="col-sm-2">@Html.DisplayNameFor(model => model.Name)</dt>
        <dd class="col-sm-10">@Html.DisplayFor(model => model.Name)</dd>
        <dt class="col-sm-2">@Html.DisplayNameFor(model => model.Description)</dt>
        <dd class="col-sm-10">@Html.DisplayFor(model => model.Description)</dd>
        <dt class="col-sm-2">@Html.DisplayNameFor(model => model.Image)</dt>
        <dd class="col-sm-10">
            @if (!ViewBag.ImageExist)
            {
                <img src="~/images/no-image.jpg" class="rounded-circle"
                 height="300" width="300" asp-append-version="true" />
            }
            else
            {
                <img src="~/images/@Model.Image" class="rounded-circle"
                 height="300" width="300" asp-append-version="true" />
            }
        </dd>
        <dt class="col-sm-2">@Html.DisplayNameFor(model => model.Price)</dt>
        <dd class="col-sm-10">@Html.DisplayFor(model => model.Price)</dd>
        <dt class="col-sm-2">@Html.DisplayNameFor(model => model.Stock)</dt>
        <dd class="col-sm-10">@Html.DisplayFor(model => model.Stock)</dd>
        <dt class="col-sm-2">@Html.DisplayNameFor(model => model.Category)</dt>
        <dd class="col-sm-10">@Html.DisplayFor(model => model.Category.Name)</dd>
    </dl>
</div>
<div>
    <a asp-action="Edit" asp-route-id="@Model.Id" class="btn btn-primary">Edit</a> |
    <a asp-action="Index">Back to List</a>
</div>