Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. public class IndexModel : PageModel
  2. {
  3. public IList<Book> Books { get; private set; }
  4. private readonly LibraryContext _db;
  5. public IndexModel(LibraryContext db)
  6. {
  7. _db = db;
  8. }
  9. public void OnGet()
  10. {
  11. Books = _db.Books.AsNoTracking().ToList();
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement