コード例 #1
0
        public IActionResult Delete(int id)
        {
            var flower = _flowerRepository.GetById(id);

            _flowerRepository.Delete(flower);

            return(RedirectToAction("List"));
        }
コード例 #2
0
 public IActionResult Delete(int id)
 {
     if (flowerRepository.Delete(id))
     {
         return(RedirectToAction("Index"));
     }
     return(View());
 }