public IActionResult Delete(int id)
        {
            var news = _newsData.GetNews(id);

            _newsData.DeleteNews(news);
            return(RedirectToAction("Index", "News"));
        }
Esempio n. 2
0
        public JsonResult DeleteNews(DuyuruHaber news)
        {
            _newsData.DeleteNews(news.DuyuruId);

            return(Json(new Response {
                ErrorMessage = "Silinmiştir", IsSuccess = false
            }, JsonRequestBehavior.AllowGet));
        }