// GET: Books //[Authorize] public async Task <IActionResult> ListAll() { var model = new SearchBooksViewModel() { BookList = await _bookRepo.GetAllIncludedAsync(), SearchText = null }; return(View(model)); }
public object Get(SearchBooksViewModel request) { return(BookRepository.All().Where(a => (string.IsNullOrEmpty(request.Author) || a.Author.ToLowerInvariant().Contains(request.Author.ToLowerInvariant())))); }