public async Task <IActionResult> SearchByIsbn(string ISBN) { if (ISBN != null) { var Book = (from b in _UW._Context.Books where (b.ISBN == ISBN) select new BooksIndexViewModel { Title = b.Title, Author = BookShopContext.GetAllAuthors(b.BookID), Translator = BookShopContext.GetAllTranslators(b.BookID), Category = BookShopContext.GetAllCategories(b.BookID), }).FirstOrDefaultAsync(); if (Book.Result == null) { ViewBag.Msg = "سندی با این شابک پیدا نشد."; } return(View(await Book)); } else { return(View()); } }