public async Task <ActionResult <Zoo> > Delete(int id) { try { Zoo animal = await _repo.GetById(id); if (animal == null) { return(BadRequest()); } await _repo.Remove(animal); return(animal); } catch (Exception e) { Console.WriteLine(e); return(BadRequest()); } }