Looks like I am missing a using directive or an assembly reference.
I made a CSHTML page to show a bill to user. this is made as an empty page using TBL_Bill table. but I encounter an error while trying to read data from other tables such as Tbl_Product for products. The error tells me
Tbl_Bill does not contain a definition for Tbl_Product and no accessible extension method accepting a first argument of type Tbl_Bill could be found. Are you missing a using directive or an assembly reference?
Code:
@model IEnumerable<fardashahr3.Models.Domain.Tbl_Bill>
@using fardashahr3.Models.Repository
@using fardashahr3.Models.Plugins
@{
ViewBag.Title = "sales";
Layout = "~/Views/Shared/_Profile.cshtml";
}
<div class="part_left">
<div id="product_list" class="userpanel_bright_section">
@if (ViewBag.Error != null)
{
<div class="alert alert-danger">
<a class="close" style="cursor:pointer;" onclick="$('.alert').hide()">×</a>
@ViewBag.Error
</div>
}
@if (Model != null)
{
<h1 class="separator"> شماره فاکتور : @Model.InvoiceNumber</h1>
if (Model.Tbl_Product.Product_IsDownload == false)
{
<div class="table_style1" id="UpIBill">