public void DeleteHorse(int id) { var horseToDelete = _horseService.GetHorseById(id); if (horseToDelete == null) { throw new HttpResponseException(HttpStatusCode.NotFound); } _horseService.DeleteHorse(horseToDelete.FirstOrDefault()); }
public void DeleteHorse(int id) { var horseToDelete = _horseService.GetHorseById(id); if (horseToDelete == null) { throw new HttpResponseException(HttpStatusCode.NotFound); } _horseService.DeleteHorse(horseToDelete.FirstOrDefault()); }