Introduction to entity framework core

preview_player
Показать описание
This is an introduction to Entity Framework Core. Entity Framework Core, also called EF Core is a complete rewrite from the ground up. If you have any experience with previous versions of Entity Framework, you will find lot of familiar features.

Text version of the video

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.

Slides

ASP.NET Core Text Articles & Slides

ASP.NET Core Tutorial

Angular, JavaScript, jQuery, Dot Net & SQL Playlists

What is EF Core

EF Core is an ORM (Object-Relational Mapper).

EF core is lightweight, extensible, and open source software. Like .NET Core, EF Core is also cross platform. It works on windows, Mac OS, and Linux. EF core is Microsoft’s official data access platform.

What is ORM

ORM stands for Object-Relational Mapper and it enables developers to work with a database using business objects. As a developer we work with the application business objects and the ORM generates the SQL that the underlying database understands. In-short, an ORM, eliminates the need for most of the data-access code that developers usually need to write.

Why use an ORM

Let's understand, the use of an ORM with an example. If we are developing an application to manage employees we would have classes like Employee, Department etc in our application code. These classes are called the Domain classes.

Without an ORM like EF Core, we have to write a lot of custom data access code to store and retrieve employee and department data from the underlying database.

For example to read, insert, update or delete data from the underlying database table we have to write code in the application to generate the required sql statements that the underlying database understands. Also when the data is read from the database into our application, we again have to write custom code to map the database data to our model classes like Employee, Department etc. This is a very common task that we do almost in every application.

An ORM like EF Core can do all of this for us and saves a lot of time. It sits between our application code and the Database. It eliminates the need for most of the custom data-access code that we usually have to write without an ORM.

EF Core Code First Approach

EF Core supports both Code First approach and Database First approach. However, with the Database First approach there is very limited support in EF core at the moment.

With the Code First Approach, we first create our application domain classes like Employee, Customer etc and a special class that derives from Entity Framework DbContext class. Based on these domain and DBContext classes, EF Core creates the database and relevant tables. Out of the box, EF Core uses it's default conventions to create the database and database tables. You can change these default conventions if you want to.

EF Core Database First Approach

Sometimes we may have an existing database. When we have a database and the database tables already, we use the database first approach. With the database first approach, EF Core creates the DBContext and Domain classes based on the existing database schema.

EF Core Database Providers

EF Core supports many relational and even non relational databases. EF Core is able to do this by using plug-in libraries called the database providers. These database providers are available as NuGet packages.

List of EF Core Database Providers

A database provider, usually sits between EF Core and the database it supports. The database provider contains the functionality specific to the database it supports. Functionality that is common to all the databases is in the EF Core component. Functionality that is specific to a database, for example, Microsoft SQL Server specific functionality is with-in the SQL Server provider for EF Core.

Рекомендации по теме
Комментарии
Автор

Thank you for including EFC in this series!

deepwoodsengineering
Автор

Thank you for this helpful content. Always Excellent.

salomonks-francais
Автор

Very good explanation! Thanks for your time spent doing this.

bogdan.p
Автор

Venkat! Venkat! Venkat! Thank you Sir ✨

aaronaaronaaron
Автор

This is the first video I found which explains the concept first so I can understand the code. Thanks :D

jenniferkoo
Автор

After quite a long time wait, Sir venkat is here. Hats off sir.

alihameed
Автор

Hi Sir,
It would be really helpful if you can upload videos for LINQ to Entities.
Amazing videos from you. Have been following all your tutorials. They are crystal clear. Thanks alot for these!!!

shravanishetty
Автор

Thank you sir.. your videos all are awesome..

sakthir
Автор

Welcome back, Hope all is well and good. Excellent content, looking forward for the next video. Keep up the great work.

rayt
Автор

I just want to know if the accepted norm is to take the code first approach or is it a "depends on your situation"?

JohnDoe-qnej
Автор

Please do vlog tell us about yourself and answer few personal questions
Really great explanation thanks

jamilamini
Автор

I don't agree that Database first have *very* limited support since it will do the job.. Its actually a more robust way of developing if you ask me. A database should never depend on the code of one project. The code should depend on the database-design as project scales you are likely to have more units connecting to the db then your mvc-project. Code-first encourages lazy database design.
However for smaller apps code-first makes progress very fast since it provides the feeling that you are relieved of having to do db-stuff.

As you get comofortable with EF you will most likely use a mix of database-first and code-first.

EF core have limitation today that forces you to use work-arounds. But its not strictly limited to Database-first approach.

QuickZ_
Автор

Hey, could you please tell if BCA IS WORTH DOING

SaurabhGupta-ypgi
Автор

Dear kudvenkat. Would you please do the tutorial on Contoso University by Microsoft for Asp.Net core Mvc. I found some other videos but none of them are understandable.

roxn
Автор

Lead us to the land of: Entity Framework Core, Asp.Net Core, SSMS, and Angular!

deepwoodsengineering
Автор

do we have mode first approach in entity framework.Can you please guide me on the same.I did not find ADO.net entity model to create a model first

vidhya.n
Автор

i am a bit confused, is this EF core or EF core 2.0?

tafellappen
Автор

Sir please make a video tutorial on Entity Framework Core

rajarshibanerjee
Автор

Entity framework sumthing that I had always struggled to understand

NikhilShirgaonkar
Автор

Please share dot net core api with layered architecture

rahulsharma-xvnp