I would like to using two times @model to get data from another part of my website is it possible? Because now I have got error but if I have only this first @model everything working correct.
Look -> MVC 3 - Exception Details: System.InvalidOperationException
Error 2 'SportsStore.Entities.Kategorie' does not contain a definition for 'Opis' and no extension method 'Opis' accepting a first argument of type 'SportsStore.Entities.Kategorie' could be found (are you missing a using directive or an assembly reference?) c:\Users\Rafal\Desktop\MVC ksiązka\moj projekt\sklep\SportsStore.WebUI\Views\Product\List.cshtml 16 4 SportsStore.WebUI
@model IEnumerable<SportsStore.Entities.Towar>
@model IEnumerable<SportsStore.Entities.Kategorie>
@{
ViewBag.Title = "List";
}
<h2>List</h2>
@foreach (var p in Model)
{
<div class="item">
<h3>@p.Nazwa</h3>
@p.Opis
<h4>@p.Cena.ToString("c")</h4>
</div>
}