这是我的代码模糊误差
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);
}
,我得到了下面的错误。
Ambiguity between 'MyHotel.Models.HotelMGT.AccountHead' and
'MyHotel.Models.HotelMGT.AccountHead'
编号与C#或MVC有关的错误,我该如何解决这个问题?所有的建议是值得欢迎的。
问候。
这表明,你有两个班在同一个命名空间相同的名称,以及I'T不会编译。 – 2012-04-21 14:32:52