Example #1
0
        public ActionResult <Animal> PegarAnimalPorId(string id)
        {
            var Animal = _mongoDbService.Get(id);

            if (Animal == null)
            {
                return(Json(Animal));
            }
            return(Animal);
        }
Example #2
0
        public ActionResult <Animal> PegarAnimalPorId(string id)
        {
            var animal = _mongoDbService.Get(id);

            if (animal == null)
            {
                return(NotFound());
            }
            return(animal);
        }
 public List <Book> Get()
 {
     return(_bookService.Get());
 }