Exemple #1
0
        public void GetPropertyImageByIdTest_ReturnPropertyImage()
        {
            var PropertyImage = _realStateAPIRepository.GetPropertyImageById(1);

            Assert.AreNotEqual(PropertyImage, null);

            Assert.Pass();
        }
Exemple #2
0
        public ActionResult <PropertyImageDTO> GetPropertyImageById(int idPropertyImage)
        {
            PropertyImage propertyImage = _realStateAPIRepository.GetPropertyImageById(idPropertyImage);

            if (propertyImage == null)
            {
                return(NotFound());
            }

            PropertyImageDTO propertyImageDTO = _mapper.Map <PropertyImageDTO>(propertyImage);

            return(propertyImageDTO);
        }