Example #1
0
        public IHttpActionResult Search(string name)
        {
            List <Book> list = repo.BookSearch(name);

            if (list != null)
            {
                return(Ok(list));
            }
            else
            {
                return(StatusCode(HttpStatusCode.NoContent));
            }
        }
Example #2
0
 public IActionResult BookSearch(BookSearch model)
 {
     ViewBag.SearchList = GetSearchList();
     return(View(_bookRepository.BookSearch(model)));
 }