Exemplo n.º 1
0
        public ApiResult <NewsDto> GetNewsById(string id)
        {
            _logger.Info("開始呼叫SysNewsService.GetNewsById");
            ApiResult <NewsDto> apiResult = new ApiResult <NewsDto>();

            apiResult.State = false;
            try
            {
                apiResult.Result = _sysNewsService.GetNewsById(id);
                apiResult.State  = true;
            }
            catch (Exception ex)
            {
                apiResult.Message = ex.ToString();
            }
            return(apiResult);
        }