public IActionResult Delete(int id) { var news = _newsData.GetNews(id); _newsData.DeleteNews(news); return(RedirectToAction("Index", "News")); }
public JsonResult DeleteNews(DuyuruHaber news) { _newsData.DeleteNews(news.DuyuruId); return(Json(new Response { ErrorMessage = "Silinmiştir", IsSuccess = false }, JsonRequestBehavior.AllowGet)); }