Last post Aug 02, 2016 11:45 AM by sudip_inn
Aug 01, 2016 09:27 AM|sudip_inn|LINK
please give me bit details about DbContext and DbSet in EF and what is their usage. if possible show me the usage of DbContext and DbSet in EF.
also tell me DbContext and DbSet is related to EF code first or DB first.
Aug 01, 2016 10:11 AM|JLaxmi|LINK
A DbContext corresponds to your database (or a collection of tables and views in your database) whereas a DbSet corresponds to a table or view in your database. So it makes perfect sense that you will get a combination of both!
You can go through the below links for more information.
Aug 01, 2016 01:49 PM|sudip_inn|LINK
you did not answer this point which i asked : also tell me DbContext and DbSet is related to EF code first or DB first.
Aug 02, 2016 05:27 AM|JLaxmi|LINK
It is EF concept irrespective of Code First or DB First. In Code first we have to manually define the DB Context. In DB first approach this will be created by the EF. In both we have to access the entities using DBContext. As discussed in the above mentioned
links DBSet represent the entities or to be precise tables.
Aug 02, 2016 05:32 AM|Fei Han - MSFT|LINK
DbContext is a bridge between your domain or entity classes and the database. The image below illustrates DbContext.
for more information about DbContext, you could check this article.
Aug 02, 2016 11:45 AM|sudip_inn|LINK
DbContext and DbSet is related to EF code first or DB first ?
or DbContext is used in EF db first and code first too?
what is domain class ?
give me sample domain class example.