public async Task <IActionResult> Delete(int id) { var spider = await _spiderService.Get(id); if (spider.Image != null) { _cloudinaryService.DeleteSpiderImage(spider.Image.Id); } if (spider.AnimalTaxonomy != null) { await _animalTaxonomyService.Delete(spider.AnimalTaxonomyId); } await _spiderService.Delete(id); return(RedirectToAction("List")); }
public async Task <IActionResult> Delete(int Id) { await _animalTaxonomyService.Delete(Id); return(RedirectToAction("List")); }