in this video we will discuss the significance of the dbcontext class in entity framework core
text version of the video
https://csharp-video-tutorials.blogspot.com/2019/04/dbcontext-in-entity-framework-core_23.html
healthy diet is very important for both body and mind. we want to inspire you to cook and eat healthy. if you like aarvi kitchen recipes, please support by sharing, subscribing and liking.
https://www.youtube.com/channel/uc7sewixm_yfamyonqcrgfwa/?sub_confirmation=1
slides
https://csharp-video-tutorials.blogspot.com/2019/04/dbcontext-in-entity-framework-core_21.html
asp.net core text articles & slides
https://csharp-video-tutorials.blogspot.com/2019/01/aspnet-core-tutorial-for-beginners.html
asp.net core tutorial
https://www.youtube.com/playlist?list=pl6n9fhu94yhvkdruslaqsferml_jh4xmu
angular, javascript, jquery, dot net & sql playlists
https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd
one of the very important classes in entity framework core is the dbcontext class. this is the class that we use in our application code to interact with the underlying database. it is this class that manages the database connection and is used to retrieve and save data in the database.
to use the dbcontext class in our application
we create a class that derives from the dbcontext class.
dbcontext class is in microsoft.entityframeworkcore namespace.
public class appdbcontext : dbcontext
{ }
for the dbcontext class to be able to do any useful work, it needs an instance of the dbcontextoptions class.
the dbcontextoptions instance carries configuration information such as the connection string, database provider to use etc.
to pass the dbcontextoptions instance we use the constructor as shown in the example below.
we will discuss more about the dbcontextoptions class in our next video when we discuss database connection string in asp.net core.
public class appdbcontext : dbcontext
{
public appdbcontext(dbcontextoptions[appdbcontext] options)
: base(options)
{
}
}
the dbcontext class includes a dbset[tentity] property for each entity in the model.
at the moment in our application we have, only one entity class - employee.
so in our appdbcontext class we only have one dbset[employee] property.
we will use this dbset property employees to query and save instances of the employee class.
the linq queries against the dbset[tentity] will be translated into queries against the underlying database.
we will see this in action in our upcoming videos.
public class appdbcontext : dbcontext
{
public appdbcontext(dbcontextoptions[appdbcontext] options)
: base(options)
{
}
public dbset[employee] employees { get; set; }
}
to be able to connect to a database we need the database connection string. in our next video, we will discuss, where do define the connection string and using it in entity framework core.
in this video we will discuss the significance of the dbcontext class in entity framework coretext version of the videohttps://csharp-video-tutorials.blogspot.com/2019/04/dbcontext-in-entity-framework-core_23.htmlhealthy diet is very important for both body and mind. we want to inspire you to cook and eat healthy. if you like aarvi kitchen recipes, please support by sharing, subscribing and liking.https://www.youtube.com/channel/uc7sewixm_yfamyonqcrgfwa/?sub_confirmation=1slideshttps://csharp-video-tutorials.blogspot.com/2019/04/dbcontext-in-entity-framework-core_21.htmlasp.net core text articles & slideshttps://csharp-video-tutorials.blogspot.com/2019/01/aspnet-core-tutorial-for-beginners.htmlasp.net core tutorialhttps://www.youtube.com/playlist?list=pl6n9fhu94yhvkdruslaqsferml_jh4xmuangular, javascript, jquery, dot net & sql playlistshttps://www.youtube.com/user/kudvenkat/playlists?view=1&sort=ddone of the very important classes in entity framework core is the dbcontext class. this is the class that we use in our application code to interact with the underlying database. it is this class that manages the database connection and is used to retrieve and save data in the database.to use the dbcontext class in our applicationwe create a class that derives from the dbcontext class.dbcontext class is in microsoft.entityframeworkcore namespace.public class appdbcontext : dbcontext{ }for the dbcontext class to be able to do any useful work, it needs an instance of the dbcontextoptions class.the dbcontextoptions instance carries configuration information such as the connection string, database provider to use etc.to pass the dbcontextoptions instance we use the constructor as shown in the example below.we will discuss more about the dbcontextoptions class in our next video when we discuss database connection string in asp.net core.public class appdbcontext : dbcontext{public appdbcontext(dbcontextoptions[appdbcontext] options): base(options){}}the dbcontext class includes a dbset[tentity] property for each entity in the model.at the moment in our application we have, only one entity class - employee.so in our appdbcontext class we only have one dbset[employee] property.we will use this dbset property employees to query and save instances of the employee class.the linq queries against the dbset[tentity] will be translated into queries against the underlying database.we will see this in action in our upcoming videos.public class appdbcontext : dbcontext{public appdbcontext(dbcontextoptions[appdbcontext] options): base(options){}public dbset[employee] employees { get; set; }}to be able to connect to a database we need the database connection string. in our next video, we will discuss, where do define the connection string and using it in entity framework core. asp net core environment tag helper bootstrap navigation menu in asp net core application form tag helpers in asp net core asp net core model binding asp net core model validation select list validation in asp net core addsingleton vs addscoped vs addtransient introduction to entity framework core install entity framework core in visual studio dbcontext in entity framework core using sql server with entity framework core repository pattern in asp net core entity framework core migrations beginner blender anvil tutorial trailer blender intermediate modelling tutorial part 1 blender intermediate modelling tutorial part 2 boolean blender intermediate modelling tutorial part 3 sharpening edges blender intermediate modelling tutorial part 4 final touches blender intermediate uv unwrapping tutorial blender intermediate tutorial how to sculpt details how to bake perfect normals in blender tutorial texturing in blender intermediate tutorial part 1 texturing in blender intermediate tutorial part 2 texturing in blender intermediate tutorial part 3 final introduction to servlets 1 servlet and jsp tutorial eclipse setup and tour 2 servlet and jsp tutorial configure tomcat in eclipse 3 servlet and jsp tutorial eclipse and tomcat setup on windows 4 servlet and jsp tutorial creating web project in eclipse 5 servlet and jsp tutorial create servlet and web xml config 6 servlet and jsp tutorial get and post 7 servlet and jsp tutorial requestdispatcher calling a servlet from servlet httpservletrequest and httpservletresponse theory 8 servlet and jsp tutorial requestdispatcher and sendredirect theory 9 servlet and jsp tutorial sendredirect url rewriting 10 servlet and jsp tutorial httpsession cookie servletconfig and servletcontext servlet and jsp tutorial servlet annotation configuration servlet and jsp tutorial why jsp how jsp translated into servlets jsp to servlet conversion netbeans jsp tags scriptlet declaration directive expression jsp directive page include taglib implicit objects in jsp exception handling in jsp mvc using servlet and jsp jstl tutorial part 1 el jstl tutorial part 2 core tags jstl tutorial sql tags part 1 jstl tutorial sql tags part 2 jstl tutorial function tags servlet filter tutorial theory login using servlet and jsp login using servlet and jsp practical part 1 login using servlet and jsp how to prevent back button after logout part 2 login using servlet and jsp jdbc part 3 servlet jsp jdbc maven example sesame street how to make a california sushi roll cookie monster s foodie truck sesame street how to make pup sicle doggie treats cookie monster s foodie truck sesame street how to make s mores cookie monster s foodie truck asp net core environment tag helper bootstrap navigation menu in asp net core application form tag helpers in asp net core asp net core model binding asp net core model validation select list validation in asp net core addsingleton vs addscoped vs addtransient introduction to entity framework core install entity framework core in visual studio dbcontext in entity framework core using sql server with entity framework core repository pattern in asp net core entity framework core migrations beginner blender anvil tutorial trailer blender intermediate modelling tutorial part 1 blender intermediate modelling tutorial part 2 boolean blender intermediate modelling tutorial part 3 sharpening edges blender intermediate modelling tutorial part 4 final touches blender intermediate uv unwrapping tutorial blender intermediate tutorial how to sculpt details how to bake perfect normals in blender tutorial texturing in blender intermediate tutorial part 1 texturing in blender intermediate tutorial part 2 texturing in blender intermediate tutorial part 3 final introduction to servlets 1 servlet and jsp tutorial eclipse setup and tour 2 servlet and jsp tutorial configure tomcat in eclipse 3 servlet and jsp tutorial eclipse and tomcat setup on windows 4 servlet and jsp tutorial creating web project in eclipse 5 servlet and jsp tutorial create servlet and web xml config 6 servlet and jsp tutorial get and post 7 servlet and jsp tutorial requestdispatcher calling a servlet from servlet httpservletrequest and httpservletresponse theory 8 servlet and jsp tutorial requestdispatcher and sendredirect theory 9 servlet and jsp tutorial sendredirect url rewriting 10 servlet and jsp tutorial httpsession cookie servletconfig and servletcontext servlet and jsp tutorial servlet annotation configuration servlet and jsp tutorial why jsp how jsp translated into servlets jsp to servlet conversion netbeans jsp tags scriptlet declaration directive expression jsp directive page include taglib implicit objects in jsp exception handling in jsp mvc using servlet and jsp jstl tutorial part 1 el jstl tutorial part 2 core tags jstl tutorial sql tags part 1 jstl tutorial sql tags part 2 jstl tutorial function tags servlet filter tutorial theory login using servlet and jsp login using servlet and jsp practical part 1 login using servlet and jsp how to prevent back button after logout part 2 login using servlet and jsp jdbc part 3 servlet jsp jdbc maven example sesame street how to make a california sushi roll cookie monster s foodie truck sesame street how to make pup sicle doggie treats cookie monster s foodie truck sesame street how to make s mores cookie monster s foodie truck asp net core environment tag helper bootstrap navigation menu in asp net core application form tag helpers in asp net core asp net core model binding asp net core model validation select list validation in asp net core addsingleton vs addscoped vs addtransient introduction to entity framework core install entity framework core in visual studio dbcontext in entity framework core using sql server with entity framework core repository pattern in asp net core entity framework core migrations beginner blender anvil tutorial trailer blender intermediate modelling tutorial part 1 blender intermediate modelling tutorial part 2 boolean blender intermediate modelling tutorial part 3 sharpening edges blender intermediate modelling tutorial part 4 final touches blender intermediate uv unwrapping tutorial blender intermediate tutorial how to sculpt details how to bake perfect normals in blender tutorial texturing in blender intermediate tutorial part 1 texturing in blender intermediate tutorial part 2 texturing in blender intermediate tutorial part 3 final introduction to servlets 1 servlet and jsp tutorial eclipse setup and tour 2 servlet and jsp tutorial configure tomcat in eclipse 3 servlet and jsp tutorial eclipse and tomcat setup on windows 4 servlet and jsp tutorial creating web project in eclipse 5 servlet and jsp tutorial create servlet and web xml config 6 servlet and jsp tutorial get and post 7 servlet and jsp tutorial requestdispatcher calling a servlet from servlet httpservletrequest and httpservletresponse theory 8 servlet and jsp tutorial requestdispatcher and sendredirect theory 9 servlet and jsp tutorial sendredirect url rewriting 10 servlet and jsp tutorial httpsession cookie servletconfig and servletcontext servlet and jsp tutorial servlet annotation configuration servlet and jsp tutorial why jsp how jsp translated into servlets jsp to servlet conversion netbeans jsp tags scriptlet declaration directive expression jsp directive page include taglib implicit objects in jsp exception handling in jsp mvc using servlet and jsp jstl tutorial part 1 el jstl tutorial part 2 core tags jstl tutorial sql tags part 1 jstl tutorial sql tags part 2 jstl tutorial function tags servlet filter tutorial theory login using servlet and jsp login using servlet and jsp practical part 1 login using servlet and jsp how to prevent back button after logout part 2 login using servlet and jsp jdbc part 3 servlet jsp jdbc maven example sesame street how to make a california sushi roll cookie monster s foodie truck sesame street how to make pup sicle doggie treats cookie monster s foodie truck sesame street how to make s mores cookie monster s foodie truck in this video we will discuss the significance of the dbcontext class in entity framework core
text version of the video
https://csharp-video-tutorials.blogspot.com/2019/04/dbcontext-in-entity-framework-core_23.html
healthy diet is very important for both body and mind. we want to inspire you to cook and eat healthy. if you like aarvi kitchen recipes, please support by sharing, subscribing and liking.
https://www.youtube.com/channel/uc7sewixm_yfamyonqcrgfwa/?sub_confirmation=1
slides
https://csharp-video-tutorials.blogspot.com/2019/04/dbcontext-in-entity-framework-core_21.html
asp.net core text articles & slides
https://csharp-video-tutorials.blogspot.com/2019/01/aspnet-core-tutorial-for-beginners.html
asp.net core tutorial
https://www.youtube.com/playlist?list=pl6n9fhu94yhvkdruslaqsferml_jh4xmu
angular, javascript, jquery, dot net & sql playlists
https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd
one of the very important classes in entity framework core is the dbcontext class. this is the class that we use in our application code to interact with the underlying database. it is this class that manages the database connection and is used to retrieve and save data in the database.
to use the dbcontext class in our application
we create a class that derives from the dbcontext class.
dbcontext class is in microsoft.entityframeworkcore namespace.
public class appdbcontext : dbcontext
{ }
for the dbcontext class to be able to do any useful work, it needs an instance of the dbcontextoptions class.
the dbcontextoptions instance carries configuration information such as the connection string, database provider to use etc.
to pass the dbcontextoptions instance we use the constructor as shown in the example below.
we will discuss more about the dbcontextoptions class in our next video when we discuss database connection string in asp.net core.
public class appdbcontext : dbcontext
{
public appdbcontext(dbcontextoptions[appdbcontext] options)
: base(options)
{
}
}
the dbcontext class includes a dbset[tentity] property for each entity in the model.
at the moment in our application we have, only one entity class - employee.
so in our appdbcontext class we only have one dbset[employee] property.
we will use this dbset property employees to query and save instances of the employee class.
the linq queries against the dbset[tentity] will be translated into queries against the underlying database.
we will see this in action in our upcoming videos.
public class appdbcontext : dbcontext
{
public appdbcontext(dbcontextoptions[appdbcontext] options)
: base(options)
{
}
public dbset[employee] employees { get; set; }
}
to be able to connect to a database we need the database connection string. in our next video, we will discuss, where do define the connection string and using it in entity framework core.