Пример #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);
                }
            }
        }