Howe решение это>?
The model item passed into the dictionary is of type 'System.Collections.Generic.List`1[metro1.DAL.Tbl_Category]', but this dictionary requires a model item of type 'System.Collections.Generic.IEnumerable`1[metro1.DAL.Tbl_Product]'.
Что я уже пробовал:
@model IEnumerable<metro1.DAL.Tbl_Category> @{ ViewBag.Title = "category"; Layout = "~/Views/Shared/_Layout.cshtml"; } <h2>category</h2> @foreach (var item in Model) { <a href=" @Url.Action("SubCategory", "SubCategory", new { id = item.CategoryId })">Link</a> <!-- SECTION --> <!-- shop --> <div class="col-md-3 col-xs-12" > <div class="shop"> <div class="shop-img"> <img src="~/metroStyl/img/shop01.png" /> <h5>@item.CategoryId</h5> </div> <div class="shop-body" > <h3>@item.CategoryName<br>Collection</h3> <a href="" class="cta-btn">@item.CategoryName</a> </div> </div> </div> }