Esempio n. 1
0
 public IActionResult CreateCat([FromBody] shared.Cat cat)
 {
     _dataAccess.CreateCat(cat);
     return(Ok());
 }
Esempio n. 2
0
        //[Authorize]
        //Create an cat
        public IActionResult DoCreateCat(Shelter.Shared.Cat cat)
        {
            Animal createdAnimal = _dataAccess.CreateCat(cat);

            return(createdAnimal == default(Shared.Animal) ? (IActionResult)NotFound("No animal found with these parameters") : Ok(createdAnimal));
        }