public async Task <PagedResult <Post> > GetAll(int pageNo, int pageSize, string orderByProperties, FilterNode filter = null) { var result = await _adminModelService.GetAll(pageNo, pageSize, orderByProperties, filter, new List <string>() { nameof(Post.Blog), nameof(Post.Category), nameof(Post.Tags), }); var allUsers = await GetAllUsers(); foreach (var post in result.Data) { post.CreatedByUser = allUsers[post.CreatedBy]; if (post.ModifiedBy == Guid.Empty) { continue; } post.ModifiedByUser = allUsers[post.ModifiedBy]; } return(await Task.FromResult(result)); }
public async Task <PagedResult <DTO.Blog> > GetAll(int pageNo, int pageSize, string orderByProperties, FilterNode filter = null) => await _adminModelService.GetAll(pageNo, pageSize, orderByProperties, filter);