Hello and welcome to this video.
In this video, I'm going to introduce you to the entity framework.
What is the Entity Framework?
The entity framework is an object relational mapper that enables dot net developers to work with a database
using dot net objects.
So it basically eliminates the need for most of the data access code that developers usually need to
right.
So he saved a lot of time.
What is an object?
Relational mapper?
An object relational map basically provides an object oriented layer between relational databases and
object oriented programming languages without having to write any obscure query.
So basically standardizes the interfaces by reducing the boilerplate and speeding up development time.
Let's take a look at some of the features of the entity framework.
The Entity Framework works on a variety of databases, from SQL Server to obscure light and then the
Azure Cosmo database.
The entity framework is cross-platform, so it will work on Windows, Linux and Mac.
The entity framework can also be used for modelling, so it can be used to create an EDM.
EDM stands for Entity Data Model, which is based on Poco.
Poco stands for plain or sea object entities.
We get set properties of different data types, so it uses this model when querying or saving entity
data to the underlining database.
The Entity Framework allows you to perform querying so you can use it with link queries on C-sharp or
VB Dot Net.
You can use that to retrieve data from the underlining database.
The database provider usually will translate this link queries to the database specific query language.
For example, as school for a relational database entity framework also allows us to execute raw, obscure
queries directly to that database.
The entity framework can also be used for saving, so you can use it to execute, insert, update and
delete commands to the databases based on the changes that have occurred to your entities.
When you call the Save Changes method, the entity framework can also be used for concurrency, so it
uses optimistic concurrency by default.
He uses that to protect overwriting changes made by another user.
Since the data was fished from the database so it avoids existing data being overwritten by another
user, the entity framework can also be used for transaction, so it performs automatic transaction
management while querying or saving data.
It also provides options to customize transaction management.
The entity framework can also be used for caching, so it includes first level of caching out of the
box.
So repeated query will return data from the cache instead of hitting the database.
So that's the advantage of the cache.
You don't need to hit the database every time you can return data stored in the cache.
The entity framework can also be used for migrations, so it provides a set of migration commands that
can be executed on the Nugget Package Manager console or the command line interface in order to create
or manage the underlining database schema.
So these are some of the key features of the entity framework.
So that's it for this video in this video to introduce you to the entity framework.
Thanks for watching.
Bye for now.