Exemplo n.º 1
0
 public IActionResult CreateDog([FromBody] shared.Dog dog)
 {
     _dataAccess.CreateDog(dog);
     return(Ok());
 }
Exemplo n.º 2
0
        //[Authorize]
        //Create a dog
        public IActionResult DoCreateDog(Shelter.Shared.Dog dog)
        {
            Animal createdAnimal = _dataAccess.CreateDog(dog);

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