예제 #1
0
        public async Task <Tuple <IList <UserAccountLoginLog>, int> > GetLoginLogByUserId(Guid userId, int skipCount, int pageSize)
        {
            var total = await ContentAccessor.Count <UserAccountLoginLog>(x => x.UserAccountEntryId == userId);

            var contentList = await ContentAccessor.ListAsync <UserAccountLoginLog>(x => x.UserAccountEntryId == userId, skipCount, pageSize);

            return(Tuple.Create(contentList, total));
        }
예제 #2
0
 public async Task <List <ContentEntry> > GetKnowledgeArticleList(string search, Guid Id, int pageIndex, int pageSize)
 {
     search = search?.Trim();
     if (string.IsNullOrEmpty(search))
     {
         return((await ContentAccessor.ListAsync <ContentEntry>(x => x.Category.Id == Id, pageIndex, pageSize, "Tags")).ToList());
     }
     else
     {
         return((await ContentAccessor.ListAsync <ContentEntry>(x => x.Category.Id == Id &&
                                                                (x.Title.Contains(search) || x.Content.Contains(search)), pageIndex, pageSize, "Tags")).ToList());
     }
 }
예제 #3
0
 public async Task <List <ContentEntry> > GetFaqArticleList(Guid Id, int pageIndex, int pageSize)
 {
     return((await ContentAccessor.ListAsync <ContentEntry>(x => x.Category.Id == Id, (pageIndex - 1) * pageSize, pageSize)).ToList());
 }
예제 #4
0
 public async Task <List <ContentEntry> > GetFaqArticleList(int pageIndex, int pageSize)
 {
     return((await ContentAccessor.ListAsync <ContentEntry>(x => x.IsFaq, (pageIndex - 1) * pageSize, pageSize)).ToList());
 }
예제 #5
0
 public async Task GetKnowledgeArticleList(ListQuery listQuery)
 {
     await ContentAccessor.ListAsync <ContentEntry>(x => x.Category.ParentCategory.Name == listQuery.QueryKey);
 }
예제 #6
0
 public async Task <List <ContentEntry> > GetKnowledgeArticleList(string search, int pageIndex, int pageSize)
 {
     return((await ContentAccessor.ListAsync <ContentEntry>(x => x.Tags.Any(c => c.Name == PublishKey) &&
                                                            (x.Title.Contains(search) || x.Content.Contains(search)), pageIndex, pageSize, "Tags")).ToList());
 }
예제 #7
0
        public async Task <IList <CategoryComment> > GetCategoryComment(Guid cateId, int skipCount)
        {
            var categoryList = await ContentAccessor.ListAsync <CategoryComment>(x => x.CategoryId == cateId, skipCount);

            return(categoryList);
        }
예제 #8
0
 public async Task <IList <ContentEntry> > GetContentListByCategoryId(Guid Id, int skipCount = 0, int pageSize = 20)
 {
     return(await ContentAccessor.ListAsync <ContentEntry>(x => x.Category.Id == Id, skipCount, pageSize));
 }