.NET 7 & Entity Framework 7: Mastering ALL Database Relationships (1:1, 1:n, n:n) with SQL Server 🚀

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

💡 Udemy Online Courses:

Table of Contents:
00:00 .NET 7 & Entity Framework 7: Mastering ALL Database Relationships
01:40 Entity Framework & SQL Server Preparations
06:33 Implement DbContext
07:45 ConnectionString
09:39 Register the DbContext
11:30 One-to-one Relationship
19:50 One-to-many Relationship
23:53 Many-to-many Relationship
29:14 Add a Controller
30:40 Add DTOs
32:42 Create a new Character
44:23 Get a single character with all relationships

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

🚀 Join the .NET Web Academy with a 30% discount - closing soon!

PatrickGod
Автор

I expected different options for relationships, including alternative keys, but in fact, vague content without explanations in the style of the Soviet army “do it and don’t think about it!!” My friend, if you called a video about relationships, then at least try to explain what you are doing and why and what is the alternative, for example, what is bad and what is good about the approach of two entities in one table, etc. Well, it’s just not serious, 50% of the video is miraculously reset to zero the database and again and again entering records into it. I rate 2 Bidens out of 10 Bidens for this “educational” video

orhanaliyev
Автор

Just found you on YouTube by coincidence. I simply love your calm and easy way of explaining things. No hyped up background music or high arousal speaking. Just plain education. Thank you very much for this.

ronrondk
Автор

This explanation is not for mastering relationships, but only for beginners. You cannot build large projects with this information. In my opinion, the best explanation for EF Core is the documentation on the Microsoft website. Thank you I appreciate your hard work and effort.

nazeehharfoush
Автор

you're the only person that makes learning .net fun, easy, and concise, I don't know how long it would've taken me to learn concepts like these without you friend. Thank you for your efforts :)

azizhmidi
Автор

Very helpful and easy to understand - along with your earlier video ".NET 7 Beginner Course 🚀 Web API, Entity Framework 7 & SQL". Thanks a lot and much appreciated. Also, your chilled-out style of explaning takes away some of my learning stress :)

SinanZen
Автор

Another fantastic video and lesson!!! You are a great educator and creator! Thank you so much for this.

michaelrafales
Автор

I gave it a try to "refresh concepts". I learned a lot of things. Amazing, Patrick.

gusget
Автор

Pretty straightforward like usual. Thank you, Patrick!

eddyelamin
Автор

Ah, this is gonna be a fun watch later this evening. Patrick any chance for some more in depth blazor vids? Where you also go into mix and matching some custom css with tailwind.. Some fancy cart animations etc. Basically turning blazor into more than the standard enterprise look via the components hehe.

moejahid
Автор

This is good and I found it very helpful :) I have a small suggestion. If you create another video on this could you include an ER diagram to go along with the video to better understand the relationships? I understood what you did in this video but it would be much easier if there were a diagram to visualize the Characters, factions, and CharacterFaction's relationship.

de_voured
Автор

I see TLOUS reference I give a like and subscribe.... nice tutorials by the other hand

davealma
Автор

pls again, Really Good tutorial <3 .

rhdhruhrhe
Автор

You help me a lot, thx man, i really appreciate your content. Love from Brasil <3

MegaTonyBR
Автор

I really needed to understand and enhance my skills on EF CORE database mappings. Thanks to you it was made possible❤⭐️⭐️⭐️⭐️⭐️

kopilkaiser
Автор

Loved this video but I got a little lost on the controllers part. I understood that you just wanted to demonstrate basic functionality, but do you have a video either on YouTube or Udemy on building out the services, DTOs, and controllers for the different database relationships? I think I could probably do it having watched one of your API a videos but I’m not sure I would do it in a way that enforces best practices. I would have liked a lot more time showing how to build out the best practices way.

I know the controller should just call the service so there shouldn’t be queries in the controller, but I’m not yet familiar with DTOs and how to use them in the controllers/services. And if we use DTOs, we somehow wouldn’t need JsonIgnore right?

rdwok
Автор

Please make another with PostgreSQL too

zoiobnu
Автор

THis helped me Alot getting started, Thank you so much!

TM-pbky
Автор

Great video!
I have one question:
Why if I do a query like this in one to many relationship doesn't throw exception in ef core but with linq to object throws:
Suppose I have one object with many serial numbers, because the current serial number is only the last but the table is the historical too, and I want to filter what object has the serial number but only among the most recent of every object, so I did a query like this:
Context.Objects.Include(o=> o.SerialNumbers.Where(s=> s.TypeId==2)).Where(s=> == passed serial number). FirstOrDefault()

I did an include with condition, but in the where clause I expected that the FirstOrDefault().Value throws exception where the FirstOrDefault () results null, but in ef core this doesn't happen.

There is a explanation to this?

Sorry for my english and my long question, I hope it is clear what I meant to do.

Thanks in advance

alfonsdeda
Автор

Very nice explained topic. Thank you Patrick for your work 💯

gqhdrrv