目标
我想调用一个类型为List
. 我正在使用 C#.NET + MVC 4。
问题
我是初学者,我不明白以下错误:
错误1 使用泛型类型“System.Collections.Generic.List”需要 1 个类型参数
是)我有的
public ActionResult Index()
{
return Content(getProductsList(0, 14));
}
public virtual List getProductsList(int isOffer, int categoryId)
{
List data = ((IObjectContextAdapter)this).ObjectContext.ExecuteStoreQuery("CALL getProductsListForHome({0}, {1});", isOffer, categoryId).ToList();
return data;
}
我错过了什么?
提前致谢。