<% foreach (var item in ViewData["log"] as IEnumerable<RM.Entity.RM_Admin_Log>)
{%>
<a href="Acconut/safe"><font color="#ffffff">gzg</font></a>
<%} %>
BLL.RM_Admin_Log logBLL = new BLL.RM_Admin_Log();
var log = logBLL.GetList("1=1", "fdID");
this.ViewData["log"] = log;
return View();
才学习 NHibernate mvc ,ilst不会用,谢谢大家提点一下 logBLL.GetList("1=1", "fdID")返回ILIST
logBLL.GetList("1=1", "fdID")返回IList,不是泛型
ViewData["log"] as IEnumerable<RM.Entity.RM_Admin_Log>为null
需要使用List<>
没有区分IList与List<>
ViewData["log"]对象是空的