Exemplo n.º 1
0
        //[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());
            }
        }
Exemplo n.º 2
0
 public ActionResult DeleteConfirmed(Guid id)
 {
     Service.DeleteCPU(id);
     return(RedirectToAction("Index"));
 }