Пример #1
0
 public async Task <IEnumerable <Author> > BrowseByPhraseAsync(string phrase)
 => await Authors.AsQueryable().Where(x => x.FullName.ToLowerInvariant()
                                      .Contains(phrase.ToLowerInvariant())).Take(10).ToListAsync();
Пример #2
0
 public async Task <IPagedResult <Author> > BrowseAsync(int currentPage, int pageSize)
 => await Authors.AsQueryable().PaginateAsync(currentPage, pageSize);
Пример #3
0
 public async Task <Author> GetByIdAsync(Guid id)
 => await Authors.AsQueryable().FirstOrDefaultAsync(x => x.AuthorId == id);