Это видео недоступно.
Сожалеем об этом.

ASP.NET Core Web API .NET 6 2022 - 3. Many-To-Many Relationships

Поделиться
HTML-код
  • Опубликовано: 14 авг 2024
  • ASP.NET Core Web API .NET 6 2022 - 3. Many-To-Many Relationships
    Github Repo For This Project: github.com/ted...
    UML Diagram: drive.google.c...
    Twitter: / teddysmithdev
    Github: github.com/ted...
    Linkedin: / teddy-smith-015ba61a3

Комментарии • 60

  • @segunbabalola7430
    @segunbabalola7430 3 месяца назад +3

    You don't know how much what you said from 8:26 to 9:20 mean to a lot of people. The encouragement is great

  • @raggardy
    @raggardy 2 года назад +5

    Teddy, thanks so much for this series! Really simple explainations of 1-2-1 and many to many.Glad I stumbled across your channel and keep up the great work

  • @chadgregory9037
    @chadgregory9037 2 года назад +8

    I like to think about these tables and relationships in terms of an object being created.
    So for example... a many to many relationship.... we HAVE to have that join table because that is literally everything and that's where the "magic" happens.... so for example, when a trainer catches a pokemon, the pokemon entity already existed, it already had its own unique ID... the trainer/owner entity already existed and it had its own unique ID... so when the trainer catches a new pokemon (creation of a new object) the entry is occurring on the join table..... and then say a view model would have a trainer entity having an Icollection and an sql JOIN would be done in order to pull the necessary data in to make it available to the application

    • @TeddySmithDev
      @TeddySmithDev  2 года назад

      This is really cool

    • @chadgregory9037
      @chadgregory9037 2 года назад

      @@TeddySmithDev I hope it's right lol
      I let my brain get a little pretzel f-kd with the different kinds of models and use cases lol

  • @itsrino9851
    @itsrino9851 8 месяцев назад

    I love how you added some side productivity shortcuts, like the get definition !! Its little things like this that make a big difference in workflow! thanks for that!

  • @spencersedano
    @spencersedano 6 месяцев назад

    This is the first time that I understand why write or anything, I had no idea when I first saw it. Thanks a lot!

    • @TeddySmithDev
      @TeddySmithDev  6 месяцев назад

      Cool name lol. Thanks for commenting!!!

  • @trashbin2166
    @trashbin2166 Год назад +2

    Dude you're sooo good at explaining stuff (loved that pokemon analogy)! Keep it up!

  • @Tanaka-Buchou
    @Tanaka-Buchou 2 года назад +3

    Thank you, Teddy. Your explanations are precise.

  • @trungnguyencong3216
    @trungnguyencong3216 2 года назад +1

    thank you so much your repo is a life saver I have hard time understand relationship many to many

  • @vicman3122
    @vicman3122 Год назад +1

    Dude you are great, Thanks I'm going to recomend your videos to my friends

  • @petrvodicka6053
    @petrvodicka6053 Год назад +8

    Teddy good work! One possible procedure how to create more complex data structures is to create it on MS SQL server (with SQL Server management studio - SSMS) and create Database diagram, where you can see visually how the tables are joined. If you are satisfied, you can use Scaffold-DbContext command to generate model. You can make changes in the model and then migrate changes to the same (other) database through Add-Migration and Update-Database. Your changes can be seen in database diagram in SSMS. It is good to see what exactly is in database visually, I think.

  • @dq9342
    @dq9342 Год назад +1

    Thanks again, Teddy! Keep up the good teaching!

  • @kvelez
    @kvelez 3 месяца назад

    Great, I learned a lot about relationships and keys.

  • @NamNguyen-oz8uj
    @NamNguyen-oz8uj 2 года назад +1

    Thank you for your great videos, Teddy 🎉🎉🎉🎉🎉🎉

  • @user-wf8sx3bo8m
    @user-wf8sx3bo8m Год назад +1

    Great Pokemon explanation of many to many

  • @hoangphuc1072
    @hoangphuc1072 2 года назад +1

    Thank you for your great videos, Teddy

  • @reginaabdu931
    @reginaabdu931 7 месяцев назад

    Thanks, Teddy! From your subscriber from Uzbekistan!

  • @koenmjaar
    @koenmjaar 4 месяца назад

    You might want to inform the people watching that adding the collections is not a must. For me it came over as this is a MUST thing to do, while it's not (correct me if I'm wrong lol).
    F.e. If I have a table Occupation linked to the table User, I don't want to fetch every User linked to one occupation at all times, that's why we would write a specific query with the ORM to add the collection of users linked to the occupation id

  • @onurakmese2129
    @onurakmese2129 Год назад +1

    Thank you bro, you're my hero

  • @Molecular_Machine
    @Molecular_Machine 29 дней назад

    Is there a love button. Mate, the like button is not enough to appreciate your great demonatration!

  • @antoinedtube
    @antoinedtube 3 месяца назад

    Hi Teddy, when we separate the models into their own DLL (with other linked classes and other stuffs), we can't reference those dll between them to avoid circular dependencies. Then how to make those many-to-many relationships because the reference would be on only one side?

  • @weston4412
    @weston4412 Год назад +1

    So all the join classes aren't necessary if we know how to join data from different tables in SQL?

  • @user-kg2so1ol1v
    @user-kg2so1ol1v 8 месяцев назад

    лучший учитель!

  • @diegosabaris4282
    @diegosabaris4282 3 месяца назад

    very useful video, thank you very much! one question, if a pokemon can have one owner at a time, doesn't it make it a one to many relationship, rather than a many to many?

  • @caglarcansarikaya1550
    @caglarcansarikaya1550 2 года назад +1

    Thanks taddy I got this :) I have one another interesting question how should you implement a baby sitter in this. Baby sitter and pokemonowner are users, this is their role. Each owner has pokemon btw 0 to n, and also each baby sitter has a pokemon btw 0 to n. How should you create ?

  • @HiroShinji22
    @HiroShinji22 4 месяца назад

    I admit I don't get the many-to-many relationship owners with pokemons. Here, a pokemon have a name and a birth date, like "Pikachu". It's more like an unique person. And Pikachu belongs to Sacha only. Pikachu can't belong to Pierre or I don't know. It will always be "owners" who can have multiple "pokemons".

  • @busraucar2225
    @busraucar2225 Год назад +1

    Hello Teddy. I have a question. Thanks to EF, isn't it also done without creating any binding classes in many to many relationships? I mean, in Poker class: ICollection Categories is written, in Category class ICollectionPokers is written, won't a cross table be created automatically? Do we need to create binding class?

    • @TeddySmithDev
      @TeddySmithDev  Год назад

      The new EF does everything for you now. When I created this video that feature did now exist.

    • @busraucar2225
      @busraucar2225 Год назад

      @@TeddySmithDev Thanks for your response😊

  • @learnffs-pl9ie
    @learnffs-pl9ie 9 месяцев назад

    Good thing you used squirtle as example. Vaporeon would be weird.

    • @TeddySmithDev
      @TeddySmithDev  9 месяцев назад

      Squirtle is the best. Vaporeon sounds like a vape store.

    • @learnffs-pl9ie
      @learnffs-pl9ie 9 месяцев назад

      @@TeddySmithDev oh you dont know vaporeon copypasta ?

    • @TeddySmithDev
      @TeddySmithDev  9 месяцев назад

      Omg just googled lmao. U crazy 🤣🤣🤣

  • @chadgregory9037
    @chadgregory9037 2 года назад +1

    Would this be done entirely differently if we were using view models instead?

  • @JonopolyHD
    @JonopolyHD Год назад +1

    Is there much difference between a Join Table and a View?

  • @enricoroselino7557
    @enricoroselino7557 8 месяцев назад

    so why do we use ICollection here not List ? funny thing is the same question when i started watch MAUI lesson with ObservableCollection instead of list

  • @witChaos
    @witChaos Год назад +1

    Hello Teddy. I've a question. If somoene has two countries, for example he is half Spanish half Greek, is considered as a many to many relationship?

    • @TeddySmithDev
      @TeddySmithDev  Год назад

      Interesting question. Yes that would be one to many. You could even have separate table for country based data if you want.

    • @witChaos
      @witChaos Год назад

      @@TeddySmithDev one to many or many to many I'm confused 😅

    • @Saibandija
      @Saibandija Год назад

      @@witChaos This is my guess, but he probably meant many to many. A country can hold **one or many** persons, and a person can belong to **one or many** countries, therefore many to many.
      Though I think what you are actually referring to is a person's ethnicity rather than a country, in that case country (where you currently live) would have a one-to-many relationship with person and you could have another property for ethnicity (many to many).

  • @doointhedoo
    @doointhedoo 10 месяцев назад

    Teddy, I need to join two tables that are represented by two data model files in a Web API. how is this represented in the controller, the interface, and the repository?

  • @chadgregory9037
    @chadgregory9037 2 года назад +1

    1:20 team rocket says bull fucking shit!!

  • @ishanillangakoon178
    @ishanillangakoon178 9 месяцев назад

    Hi I would like to know how to identify one-to-one, one-to-many and many-to-many relationships using UML diagram ?

    • @TeddySmithDev
      @TeddySmithDev  9 месяцев назад +1

      Look for fork and where lines connect. If there are forks on both side = many to many. If only one fork, one to many

    • @ishanillangakoon178
      @ishanillangakoon178 7 месяцев назад

      @@TeddySmithDev Thank You So much ! 👍

  • @chadgregory9037
    @chadgregory9037 2 года назад +1

    My shits unable to determine the relationship between entities on my many to many

  • @nuc1earant
    @nuc1earant 8 месяцев назад +1

    WARNING! BEFORE WATCHING THIS COURSE U NEED TO WATCH ALL SEASONS AND EPISODES OF POKEMON

    • @TeddySmithDev
      @TeddySmithDev  8 месяцев назад

      🧢

    • @nuc1earant
      @nuc1earant 8 месяцев назад

      @@TeddySmithDev aint no cap guys im fr. If u wanna understand go become a pokemon guru

  • @mlbb_bros4659
    @mlbb_bros4659 5 месяцев назад +1

    ur cutie-pie

  • @awaisnazir5983
    @awaisnazir5983 10 месяцев назад

    brother doing well, but let me give you an suggestion, try to make video short one, students dont have much time to watch lengthy videos, talk less and work more 🙂

  • @aDNx1337
    @aDNx1337 Год назад

    need discord inv pls

  • @randyrivera2660
    @randyrivera2660 7 месяцев назад

    Thank you so much for this man 🫶