//[ValidateAntiForgeryToken] public IActionResult Delete(int id) { try { var cpu = _cpuService.GetCPU(id); if (cpu == null) { return(NotFound()); } var result = _cpuService.DeleteCPU(id); return(Json(result)); } catch (Exception e) { return(View()); } }
public ActionResult DeleteConfirmed(Guid id) { Service.DeleteCPU(id); return(RedirectToAction("Index")); }