Esempio n. 1
0
        // GET: Books
        //[Authorize]
        public async Task <IActionResult> ListAll()
        {
            var model = new SearchBooksViewModel()
            {
                BookList   = await _bookRepo.GetAllIncludedAsync(),
                SearchText = null
            };

            return(View(model));
        }
Esempio n. 2
0
 public object Get(SearchBooksViewModel request)
 {
     return(BookRepository.All().Where(a => (string.IsNullOrEmpty(request.Author) || a.Author.ToLowerInvariant().Contains(request.Author.ToLowerInvariant()))));
 }