Entity Framework Context Class in C# with Examples
In this article, I am going to discuss the Entity Framework Context Class in C# with Examples. Please read our previous article where we discussed the Architecture of Entity Framework in Detail. At the end of this article, you will understand what exactly the Context Class is and when and how to use this Context Class in Entity Framework with Examples.
What is Entity Framework Context Class in C#?
The Entity Framework allows us to Query, Insert, Update, and Delete data using Common Language Runtime (CLR) objects which are also known as Entities (or .NET Classes). The Entity Framework maps the entities (classes) and relationships that are defined in our model to a database.
Entities in Entity Framework in C# with Examples
In this article, I am going to discuss the Entities in the Entity Framework in C# with Examples. Please read our previous article where we discussed Entity Framework Context Class in C# with Examples.
What is an Entity in the Entity Framework?
Understanding Scalar Property and Navigation Property
What is an Entity in the Entity Framework?
We are going to work with the same example, that we worked on in our Previous articles. Let’s see the Solution of the console application that we created in the Introduction to Entity Framework article of this article series
Types of Entities in Entity Framework with Examples
In this article, I am going to discuss the Types of Entities in the Entity Framework with Examples. Please read our previous article where we discussed Entities in Entity Framework with Examples. We are going to work with the same example that we have worked on so far.
Types of Entities in Entity Framework
POCO Entities
Dynamic Proxy Entities
POCO Entities in Entity Framework
POCO stands for Plain Old CLR Objects which can be used as existing domain objects with your data model. The POCO data classes which are mapped to entities are defined in a data model. A POCO entity is a class that does not depend on any framework-specific base class. It is like any other normal .NET CLR class, which is why it is called “Plain Old CLR Objects”.
Entity States in Entity Framework
In this article, I will discuss the Entity States in the Entity Framework with Examples. Please read our previous article where we discussed Entities Types in Entity Framework.
Entity States in Entity Framework
The Entity Lifecycle in Entity Framework describes the process in which an Entity is created, added, modified, deleted, etc. Entities have many states during their lifetime. Entity Framework maintains the state of each entity during its lifetime. Each entity has a state based on the operation performed on it via the context class (the class which is derived from DbContext class). The entity state is represented by an enum called EntityState in EF 6 with the following signature.
Development Approach with Entity Framework
In this article, I am going to discuss Development Approach with the Entity Framework. Please read our previous article where we discussed the Different States of Entity in the Entity Framework. The entity framework provides three different approaches when working with the database and data access layer in your application as per your project requirement. These are
Database-First, Code-First, Model-First
Database-First Approach of Entity Framework:
We can use the Database First Approach if the database schema already exists. In this approach, we generate the context and entities for the existing database using the EDM wizard. This approach is best suited for applications that use an already existing database.
Chapter- Entity Framework in C#
Entity Framework Context Class
Entities in Entity Framework
Types of Entities in Entity Framework
Entity States in Entity Framework
Development Approaches with Entity Framework
Text Document Links used in the Video:
Author : Pranaya Rout
Website : https://dotnettutorials.net/
Entity Framework Context Class : https://dotnettutorials.net/lesson/co...
Entities in Entity Framework : https://dotnettutorials.net/lesson/en...
Types of Entities in Entity Framework : https://dotnettutorials.net/lesson/ty...
Entity States in Entity Framework : https://dotnettutorials.net/lesson/en...
Development Approaches with Entity Framework : https://dotnettutorials.net/lesson/de...
#dotnettutorials #csharp #pranaya #dotnettutorialspranaya
#EntityFramework #EntityFrameworkInteroduction
#EntityFrameworkByDotNetTutorials #EntityFrameworkInteroductionByDotNetTutorials
#EntityFrameworkByPranaya #EntityFrameworkInteroductionByPranaya
#EntityFrameworkContextClass #EntitiesinEntityFramework
#TypesofEntitiesinEntityFramework
#EntityStatesinEntityFramework #DevelopmentApproacheswithEntityFramework