public ActionResult DeleteSave(string id) { phoneBookContext = new PhoneBookContext(); phoneBookContext.Delete(Guid.Parse(id)); ViewBag.PhoneBooks = phoneBookContext.PhoneBooks; return(View("Index")); }
public ActionResult DeleteSave(string id) { phoneBookContext = new PhoneBookContext(Server.MapPath("~/Models/Data.json")); phoneBookContext.Delete(Guid.Parse(id)); ViewBag.PhoneBooks = phoneBookContext.PhoneBooks; return(View("Index")); }