Beispiel #1
0
        public JsonResult Delete(int id)
        {
            var entity = _urunlerService.Get(x => x.ID == id).Entity;

            if (entity != null)
            {
                Helper.DeleteFile(folderPath, entity.KapakResmi);
                _urunlerService.Delete(x => x.ID == id);
                return(Json(new { Status = "success", Message = "Silindi" }));
            }
            else
            {
                return(Json(new { Status = "error", Message = "Bir hata oluştu" }));
            }
        }
Beispiel #2
0
 public ActionResult Delete(int id)
 {
     _urunService.Delete(id);
     TempData.Add("mesaj", "Ürün başarıyla silindi");
     return(View("Index"));
 }