@{
    Layout = "~/Shared/Layouts/_Layout.cshtml";
    var brandID = UrlData[0];
    if (brandID.IsEmpty()){
        Response.Redirect("/Default");
        }
    Page.Title = brandID;
    var db = Database.Open("MyEshopData");
    var sqlQuery = "SELECT productID, title, description, price, brand FROM Products WHERE products.brand = @0";
    var products = db.Query(sqlQuery, brandID);
}


    <h2>@brandID</h2>
    @if (products.Count() == 0)
        {
            <p>This category contains no products yet. Try a different one.</p>
        }
  
    <ul class="clr">
        @foreach (var item in products) {
            <li>
                <div class="img"><a href="/ProductDetails/@item.productID" class="detailsButton">
            @Products.ShowProductThumbnail(item.productID.ToString())
            </a>
                </div>
                <div class="title">
                    <a href="/ProductDetails/@item.productID">@item.title</a>

                    <div class="price">
                        <span class="st">Price:</span><strong>€@item.price</strong>
                    </div>
                </div>
            </li>
    }</ul>
