public async Task <IEnumerable <PostViewModelBase> > BuildAsync(IEnumerable <IPost> posts, CancellationToken ct) { var vms = posts.Select(post => { var vm = VkPostViewModel.Create(post); vm.IsExisting = true; return(vm); }).ToList(); //await GetOwnerNamesOfPosts(vms.Where(p => p.PostType == PostType.Repost), ct); return(vms); }
public IEnumerable <VkPostViewModel> BuildMissingViewModels(IEnumerable <int> missingDates) { return(missingDates.Select(missing => { var post = VkPostViewModel.Create(new Post { Date = missing, ID = 0, Message = "�הוס� למזוע ב�ע� ןמסע." }); post.Mark = PostMark.Bad; post.IsExisting = false; post.PostType = PostType.Missing; return post; })); }