Exemplo n.º 1
0
        public ActionResult DeleteConfirm(int id)
        {
            Responses responses = ItemRepo.Delete(id);

            if (responses.Success)
            {
                return(Json(new { success = true }, JsonRequestBehavior.AllowGet));
            }
            return(Json(new { success = false, message = "Error msg" }, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 2
0
 // DELETE api/<controller>/5
 public Responses Delete(int id)
 {
     return(ItemRepo.Delete(id));
 }
Exemplo n.º 3
0
 public IActionResult RemoveItem(ItemViewModel ivm)
 {
     _ir.Delete(ivm.Id);
     return(RedirectToAction("AllItems"));
 }