コード例 #1
0
        public async Task <IEnumerable <PropertyInfoModel> > GetPopular(int howMany)
        {
            var topFavourites = await _favouritesRepository.FindTopFavouritesAsync(howMany);

            var items = await _propertyRepository.GetListOfPropertiesByIdAsync(topFavourites);

            var mappedItems = _mapper.Map <IEnumerable <EstateUnit>, IEnumerable <PropertyInfoModel> >(items);

            return(mappedItems);
        }