public ActionResult DeleteSceneItem(string SceneItemID) { var result = new StandardJsonResult <bool>(); result.Try(() => { result.Value = _sceneItemService.DeleteSceneItem(SceneItemID); }); return(result); }
public ActionResult DeleteSceneItem(DeleteSceneModel model) { _ilog.Info(string.Format("方法名:{0};参数:{1}", "DeleteSceneItem", Serializer.ToJson(model))); var result = new StandardJsonResult(); result.Try(() => { if (!ModelState.IsValid) { throw new KnownException(ModelState.GetFirstError()); } service.DeleteSceneItem(model.MessageID, model.Time); }); _ilog.Info(string.Format("方法名:{0};执行结果:{1}", "DeleteSceneItem", Serializer.ToJson(result))); return(result); }