Introduction to Entity Framework Core 7 - Free Course!

preview_player
Показать описание


Hello, my name is Felipe Gavilán and in this video we are going to see an introduction to EF Core 7. The idea is to see at a general level several EF Core features from the beginning, we will see how to install and configure it, how to work with data, relationships, migrations, among other things.

For this video I am going to assume that you already have Visual Studio installed, in my case I am going to use VS 2022, and that you already have a database engine installed, such as localDb, SQL Server, etc. I am going to use SQL Server.
Рекомендации по теме
Комментарии
Автор

2:28 When To Use EF?
4:00 Installing EF Core CLI
6:00 Creating Web API & Installing NuGet Packages
8:40 Creating The DbContext Class
13:20 Creating The Genre Entity
13:57 Creating The Genre DbSet Property
14:56 Creating The Initial Migration Class
26:29 Creating The Actor Entity
29:11 Creating The Movie Entity
30:10 Creating The Comment Entity
31:16 Configuring EF Convention
33:43 Creating Own Files for EF Conventions
37:17 Creating Movie and Comments Relationship (One-To-Many)
39:50 Creating Movie and Genre Relationship (Many-To-Many)
43:25 Creating Movie and Actor RelationShip (Many-To-Many)
47:42 Creating The Genre Controller
50:43 Using Swagger
50:53 Adding Genre Record
52:07 Using DTOs (Data Transfer Objects)
54:28 Using AutoMapper Library
57:06 Adding Multiple Records Using AddRange()
58:13 Viewing Executed SQL Query From The Console
58:50 Creating The Actors Controller
1:02:16 Creating Movies Controller & Properties
1:05:58 Creating Movies AutoMapperProfile
1:13:06 Inserting Comments
1:16:52 Seeding Data. Awesome!
1:23:14 Querying Data
1:38:43 Querying Related Data
1:40:46 Solving "Object Cycle" Runtime Error
1:45:07 Querying Data Using Select Loading
1:48:11 Updating Records
1:50:42 Updating Records Using Disconnected Model
1:53:11 Deleting Records
2:01:31 Using Transactions
2:03:12 Publishing To Azure

ebarednaxela
Автор

WoW, awesome video! Top quality from Felipe as always!! Huge fan here Felipe!!! Fantastic work!!

fiscpar
Автор

Thank you so much Felipe. You're a saviour man! Awesome!

ebarednaxela
Автор

Can you please do more in depth video with ef core using complex linq, sql queries, store procedures

bloopers
Автор

Quick question, I keep seeing that navigation properties are optional and would like to ask if you would have gotten the same results if you had created the model without them.

vmnqxhc
Автор

I am also getting MovieId in Genre Table. I don't know what mistake I have done. Can you please tell me what could have been gone wrong ?
This is Genre Entity
using

namespace EFCoreSeven.Entities
{
public class Genre
{
public int Id { get; set; }

// [StringLength(maximumLength: 150)]
public string Name { get; set; }
}
}

Movie Entity
public class Movie
{
public int Id { get; set; }
public string Title { get; set; } = null!;
public bool InTheaters { get; set; }
public DateTime ReleaseDate { get; set; }
public HashSet<Comment> Comments { get; set; } = new HashSet<Comment>();
public HashSet<Genre> Genres { get; set; } = new HashSet<Genre>();
public HashSet<MovieActor> MovieActors { get; set; } = new HashSet<MovieActor>();
}

abhilasha