Exemplo n.º 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));
        }
Exemplo n.º 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());
     }
 }
Exemplo n.º 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());
 }
Exemplo n.º 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());
 }
Exemplo n.º 5
0
 public async Task GetKnowledgeArticleList(ListQuery listQuery)
 {
     await ContentAccessor.ListAsync <ContentEntry>(x => x.Category.ParentCategory.Name == listQuery.QueryKey);
 }
Exemplo n.º 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());
 }
Exemplo n.º 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);
        }
Exemplo n.º 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));
 }