public static EasyUI <T> Easy(IEnumerable <T> entity, int totalSize) { EasyUI <T> easyUI = new EasyUI <T>(); easyUI.total = totalSize; easyUI.rows = entity; return(easyUI); }
public static JsonResult ReturnEasyUI(IEnumerable <T> entity, int totalSize) { EasyUI <T> easyUI = new EasyUI <T>(); easyUI.total = totalSize; easyUI.rows = entity; var jsonResult = new JsonResult(); jsonResult.JsonRequestBehavior = JsonRequestBehavior.DenyGet; jsonResult.Data = easyUI; return(jsonResult); }