protected override async Task MapBeforeCacheAsync(IList <T> cached) { foreach (var activity in cached) { var entity = activity; entity.GroupId = await _groupActivityService.GetGroupIdAsync(activity.Id); await _commentsService.FillCommentsAsync(entity); await _likesService.FillLikesAsync(entity); await FillLinkPreviewAsync(entity); } }
protected override async Task MapBeforeCacheAsync(IList <Entities.News> cached) { foreach (var activity in cached) { var entity = activity; entity.Location = await _activityLocationService.GetAsync(entity.Id); entity.GroupId = await _groupActivityService.GetGroupIdAsync(activity.Id); await _commentsService.FillCommentsAsync(entity); await _likesService.FillLikesAsync(entity); } }
protected override async Task MapBeforeCacheAsync(IList <Event> cached) { foreach (var activity in cached) { var entity = activity; entity.GroupId = await _groupActivityService.GetGroupIdAsync(activity.Id); _subscribeService.FillSubscribers(entity); await _commentsService.FillCommentsAsync(entity); await _likesService.FillLikesAsync(entity); _activitySubscribeSettingService.FillSubscribeSettings(entity); } }