我正在用我的 ASP.Net MVC 应用程序实现 jQuery bootgrid。我只是对以下代码有疑问:
var tResult = BootgridResponseData<List<Contact>>()
{
current = model.current,
rowCount = model.rowCount,
rows = contacts,
total = contacts.Count
};
这给了我以下错误:
不可调用的成员“BootgridResponseData”不能像方法一样使用。
我的BootgridResponseData
班级定义如下:
public class BootgridResponseData<T> where T : class
{
public int current { get; set; } //? current page
public int rowCount { get; set; } //? rows per page
public IEnumerable<T> rows { get; set; } //? items
public int total { get; set; } //? total rows for whole query
}
这里可能有什么问题?我不是 100% 确定我在这里做什么,因为到目前为止我一直被引导这样做。