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); } }
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); } }
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); } }
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); } } }