public IHttpActionResult Search(string name) { List <Book> list = repo.BookSearch(name); if (list != null) { return(Ok(list)); } else { return(StatusCode(HttpStatusCode.NoContent)); } }
public IActionResult BookSearch(BookSearch model) { ViewBag.SearchList = GetSearchList(); return(View(_bookRepository.BookSearch(model))); }