Ejemplo n.º 1
0
        public ActionResult <ResultModel <List <AppConfigModel> > > Index()
        {
            ResultModel <List <AppConfigModel> > rs = new ResultModel <List <AppConfigModel> >()
            {
                Data = _service.Get()
            };

            return(rs);
        }
Ejemplo n.º 2
0
        public TransactionResult <AppConfig> Get(int id)
        {
            TransactionResult <AppConfig> result = new TransactionResult <AppConfig>();
            var serviceResult = AppConfigService.Get(id);

            if (serviceResult.ActionResult & serviceResult.HavingData)
            {
                result.Data = serviceResult.Data;
            }
            else
            {
                result.Code    = 103;
                result.Message = "暂无数据";
            }
            return(result);
        }