示例#1
0
        public async Task <ApiResult <List <TestWebModel> > > GetList()
        {
            var r = new ApiResult <List <TestWebModel> >();

            try
            {
                r.msg  = "查询成功";
                r.data = _mapper.Map <List <TestWebModel> >(await _testServices.GetList());
            }
            catch (Exception ex)
            {
                r.status = 500;
                r.msg    = ex.Message;
            }
            return(r);
        }