public List <SysRole> QueryAll() { SysRoleService dal = new SysRoleService(); return(dal.GetAll()); }
/// <summary> /// 获取系统所有角色 /// </summary> /// <returns></returns> public IHttpActionResult GetRoles() { var list = SysRoleService.GetAll().OrderBy(e => e.Sort).Select(e => new { code = e.Serialnum, name = e.Name }); return(new ApiResult(ExceptionCode.Success, "", list)); }