public async Task <IActionResult> Delete(Book book) { bool isAdmin = await _cs.IsItAdminAsync(User.Identity.Name); if (!isAdmin) { return(Unauthorized()); } await _bc.DeleteAsync(book); await _bc.CommitAsync(); return(RedirectToAction(nameof(Index))); }