public ActionResult DeleteKid(int id) { Kid c = ks.GetById(id); ks.Delete(c); ks.Commit(); return(RedirectToAction("Profil")); }
// [ValidateAntiForgeryToken] public JsonResult Delete(int id) { //delete the wish Wish wish = service.GetById(id); service.Delete(wish); service.Commit(); //delete the kid Kid kid = KidService.GetById(wish.KidID); KidService.Delete(kid); KidService.Commit(); return(Json("wish deleted")); }