Skip to content

Instantly share code, notes, and snippets.

Created February 22, 2018 23:38
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save dcomartin/c1634ee019133982e75877ed7f607cf2 to your computer and use it in GitHub Desktop.
@model AspNetCore.Demo.ShoppingCartViewModel
<h1>Shopping Cart</h1>
<div class="basket-content">
@foreach (var item in Model.Products)
<div class="basket-item">
<div class="basket-item-product">
<!-- IUrlHelper -->
<a href="@Url.Action("Product", "Products", new { item.Id })">
<!-- Tag Helper -->
<a asp-controller="Products" asp-action="Action"
<div class="basket-item-colour">@item.Colour</div>
<div class="basket-item-size">@item.Size</div>
<div class="basket-item-price">@item.Price</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment