public string aj_MasterSearch(q_AspNetRoles q) { var items = roleManager.Roles.ToList(); return(defJSON(new GridInfo <IdentityRole>() { rows = items, total = PageCount.TotalPage, page = PageCount.Page, records = PageCount.RecordCount, startcount = PageCount.StartCount, endcount = PageCount.EndCount })); }
public async Task <IHttpActionResult> Get([FromUri] q_AspNetRoles q) { #region 連接BusinessLogicLibary資料庫並取得資料 var items = await roleManager.Roles.ToArrayAsync(); return(Ok(new GridInfo <IdentityRole>() { rows = items, total = PageCount.TotalPage, page = PageCount.Page, records = PageCount.RecordCount, startcount = PageCount.StartCount, endcount = PageCount.EndCount })); #endregion }