This is my code
HotelMGT _DB = new HotelMGT();
public virtual ActionResult Index()
{
ViewBag.TypeID = new string[] { "Assets", "Liabilities", "Income","Expenses" };
var model = from r in _DB.AccountHead
orderby r.AccountHeadID ascending
//where r.AccountTypeID == AccountTypeID || (AccountTypeID==null)
select r; //_DB.AccountType;
return View(model );
}
and I got the following error.
Ambiguity between 'MyHotel.Models.HotelMGT.AccountHead' and
'MyHotel.Models.HotelMGT.AccountHead'
Id the error relating to C# or MVC and how do I fix this? All suggestion is welcome.
Regards.
Your comparing the same values so specify the table from which your getting the data.
The error is actually saying your comparing an egg with an egg but you only have 1 egg, we need the other egg.