我将 T 作为参数传递,并且出现此构建错误。
这是我的要求
public JsonResult SetGridProperties(Response<T> res)
{
res.ShowFilterRow = (!res.ShowFilterRow);
return Json(true, JsonRequestBehavior.AllowGet);
}
这是我的响应课
public class Response<T>
{
public bool Status { get; set; }
public string Message { get; set; }
public T Data { get; set; }
public List<T> DataList { get; set; }
public MessageTypes MessageType { get; set; }
public bool ShowFilterRow { get; set; }
public bool AllowGroup { get; set; }
}
请指导我如何使用此响应类作为参数,动态实体对象为“T”。