public void Delete(int id) { var podcast = _podcastService.GetById(id); var filePath = "Content\\Podcast\\" + podcast.name; _fileService.Delete(filePath); _podcastService.Delete(id); }
public IActionResult Delete(int id, string type, int tagId, int pageNumber) { _podcastService.Delete(id); return(RedirectToAction("Index", new { type = type, tagId, pageNumber = pageNumber == 0 ? 1 : pageNumber })); }