public IActionResult Delete(int id) { var flower = _flowerRepository.GetById(id); _flowerRepository.Delete(flower); return(RedirectToAction("List")); }
public IActionResult Delete(int id) { if (flowerRepository.Delete(id)) { return(RedirectToAction("Index")); } return(View()); }