Ejemplo n.º 1
0
        public async Task <JsonResult> DeleteDemoAsync(string Id)
        {
            var result = new OperationResult <bool>();

            try
            {
                result = await _demoService.DeleteDemoAsync(Id);
            }
            catch (Exception ex)
            {
                result.code = -1;
                result.msg  = ex.Message;
            }
            Logger.Info(JsonConvert.SerializeObject(result)); //此处调用日志记录函数记录日志
            return(Json(result));
        }