Exemple #1
0
        public void DeleteHorse(int id)
        {
            var horseToDelete = _horseService.GetHorseById(id);

            if (horseToDelete == null)
            {
                throw new HttpResponseException(HttpStatusCode.NotFound);
            }

            _horseService.DeleteHorse(horseToDelete.FirstOrDefault());
        }
Exemple #2
0
        public IActionResult DeleteHorse(int HorseId)
        {
            var model = IHorseService.DeleteHorse(HorseId);

            return(RedirectToAction("GetHorses"));
        }