public ActionResult <Pet> ChangeOwner(int petId, ChangeOwnerDTO changeOwnerDTO) { var pet = _mapper.Map <Pet>(changeOwnerDTO); _petService.ChangeOwner(petId, changeOwnerDTO.PersonId); return(Ok(pet)); }
public ActionResult <Pet> ChangeOwnerById(int currentOwnerId, ChangePetOwnerDTO NewOwner) { var petOwnerToChange = new Pet(); petOwnerToChange.PersonId = NewOwner.PersonId; var pet = _PetService.ChangeOwner(currentOwnerId, petOwnerToChange); return(Ok()); }