Example #1
0
        public IList <FavoriteLabelContract> GetFavoriteLabels(int latestLabelCount)
        {
            var user = TryGetUser();

            var dbResult = latestLabelCount == 0
                ? m_favoritesRepository.GetAllFavoriteLabels(user.Id)
                : m_favoritesRepository.GetLatestFavoriteLabels(latestLabelCount, user.Id);

            return(Mapper.Map <IList <FavoriteLabelContract> >(dbResult));
        }