// // GET: /Class/Delete/5 public ActionResult Delete(int id) { Class cls = ClassBO.GetClassByID(id); ClassBO.Delete(cls); return(RedirectToAction("Index")); }
public IActionResult Delete(ClassDeleteViewModel classModel) { ClassBusiness classModelBusiness = new ClassBusiness(); var result = classModelBusiness.Delete(classModel); return(Ok(result)); }
static void Delete() { ClassBusiness cb = new ClassBusiness(); Console.Write("请输入一个博客id:"); int id = int.Parse(Console.ReadLine()); ClassName blog = cb.Query(id); cb.Delete(blog); }