public async Task <IActionResult> Delete(int id) { var controller = typeof(DemoController).Name; _logger.LogInformation($"Delete method on {controller} started"); await _demoService.Delete(id); _logger.LogInformation($"Delete method on {controller} finished successfully"); return(Ok()); }
// GET: Demo public ActionResult Index() { var id = demoSerivce.Add(new Model.DemoModel() { Demo = "Add" }); var model = demoSerivce.GetById(id); model.Demo = "Update"; demoSerivce.Update(model); demoSerivce.Delete(id); return(View()); }
/// <summary> /// 删除 /// </summary> /// <param name="ids"></param> /// <returns></returns> public ActionResult Delete(string ids) { return(JResult(IDemoService.Delete(ids))); }