我现在处理强类型是
在controler里,
this.ViewData["Category"] = this.m_dataContext.Category;
然后在view中,只能这样
var category = this.ViewData["Category"] as MvcApplication2.Models.Category
引入请类型,
不知道有没有不需要类型转换、直接引用的方式?
在controler里,
this.ViewData["Category"] = this.m_dataContext.Category;
然后在view中,只能这样
var category = this.ViewData["Category"] as MvcApplication2.Models.Category
引入请类型,
不知道有没有不需要类型转换、直接引用的方式?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货