コード例 #1
0
 protected override void MapBeforeCache(IList <Entities.News> cached)
 {
     foreach (var activity in cached)
     {
         var entity = activity;
         entity.Location = _activityLocationService.Get(entity.Id);
         entity.GroupId  = _groupActivityService.GetGroupId(activity.Id);
         _commentsService.FillComments(entity);
         _likesService.FillLikes(entity);
     }
 }
コード例 #2
0
 protected override void MapBeforeCache(IList <Bulletin> cached)
 {
     foreach (var activity in cached)
     {
         var entity = activity;
         entity.GroupId = _groupActivityService.GetGroupId(activity.Id);
         _commentsService.FillComments(entity);
         _likesService.FillLikes(entity);
         FillLinkPreview(entity);
     }
 }
コード例 #3
0
 protected override void MapBeforeCache(IList <Event> cached)
 {
     foreach (var activity in cached)
     {
         var entity = activity;
         entity.GroupId = _groupActivityService.GetGroupId(activity.Id);
         _subscribeService.FillSubscribers(entity);
         _commentsService.FillComments(entity);
         _likesService.FillLikes(entity);
         _activitySubscribeSettingService.FillSubscribeSettings(entity);
     }
 }
コード例 #4
0
        protected override void MapBeforeCache(IList <Entities.PagePromotion> cached)
        {
            foreach (var activity in cached)
            {
                var entity = activity;
                if (entity.Likeable)
                {
                    _likesService.FillLikes(entity);
                }

                if (entity.Commentable)
                {
                    _commentsService.FillComments(entity);
                }
            }
        }