/// <summary> /// 得到一条角色信息权限 /// </summary> /// <returns></returns> public static RoleResultDTO GetRole(int?id) { RoleResultDTO result = new RoleResultDTO(); var pp = GetAPI <ResultData <RoleResultDTO> >(WebConfiger.MasterDataServicesUrl + "Role/" + id); result = pp.Object; return(result); }
/// <summary> /// 得到一条角色信息 /// </summary> /// <returns></returns> public RoleResultDTO GetRole(int id) { RoleResultDTO result = new RoleResultDTO(); var tcdmse = SingleQueryObject.GetObj(); var pp = tcdmse.master_RoleInfo.AsNoTracking().Where(p => p.RoleID == id).FirstOrDefault(); if (pp == null) { throw new Exception("此条信息不存在!"); } result = AutoMapper.Mapper.Map <master_RoleInfo, RoleResultDTO>(pp); return(result); }