Exemplo n.º 1
0
        // Filtered access: Guest/Admin.
        public async Task <IActionResult> List()
        {
            var models = IsAdmin ? await resService.GetList() : await resService.ListActive();

            var dtos = mappService.Map <IEnumerable <ResourceBriefDto> >(models);

            return(Ok(dtos));
        }
Exemplo n.º 2
0
 /// <summary>
 /// 获取列表
 /// </summary>
 /// <param name="queryJson">查询参数</param>
 /// <returns>返回列表</returns>
 public IEnumerable <ResourcesEntity> GetList(string queryJson)
 {
     return(service.GetList(queryJson));
 }