public ActionResult <Pet> AddPet(CreatePetDTO createPetDTO)
        {
            var petFromDTO = _mapper.Map <Pet>(createPetDTO);

            _petService.CreatePet(petFromDTO);
            return(Ok());
        }
Exemplo n.º 2
0
        public ActionResult CreateNewPet(CreatePetDTO createPetDTO)
        {
            Pet pet = _mapper.Map <Pet>(createPetDTO);

            _PetService.CreatePet(pet);
            return(Ok());
        }
Exemplo n.º 3
0
        public ActionResult CreateNewPet(CreatePetDTO newPet)
        {
            var pet = new Pet
            {
                Name        = newPet.Name,
                PersonId    = newPet.PersonId,
                DateOfBirth = newPet.DateOfBirth
            };

            //pet.PetType = newPet.PetType;
            petService.CreatePet(pet);
            return(Ok());
        }