Answer
Ove
rf
low
Sign In With Discord
C#
help
Join
Root Question Message
BlueJayBird
8/11/2022
What are exactly DbContext and DbSet in EF? [Answered]
I was wondering if getting the DbContext is getting the entire DB and using DbSet is using the single tables. Is this correct?
Nox
8/11/2022
There's a lot of nuance but the short answer is yes, that's a high level view of it
Nox
8/11/2022
A Context may have as much or as little of the database as needed, and a DbSet may not represent the full table in the case of query filters/etc
Message Not Public
Sign In and Join Server To See
8/11/2022
Angius
8/11/2022
Generally speaking:
-
DbContext
abstracts the database
-
DbSet
abstracts the table
Contact
Frequently Asked Questions
Join The Discord
Bugs & Feature Requests
Terms & Privacy