Entity Framework - Relationships: One-to-One, Many-to-Many, One-to-Many

Sdílet
Vložit
  • čas přidán 16. 01. 2023
  • In this video, we'll learn how to create relationships between entities in Entity Framework. We'll start with the most common relationship type: One-to-One. After that, we'll learn how to create relationships between entities of the same type (Many-to-Many) and between entities of different types (One-to-Many).
    ===
    Learn EF 6: www.dotnettricks.com/paths/be...

Komentáře • 6

  • @ScholarHat
    @ScholarHat  Před 3 měsíci

    You can get a FREE demo class and see for yourself if ScholarHat's training is right for you! 👉
    www.scholarhat.com/training/net-certification-training

  • @owaiskhanafridi1149
    @owaiskhanafridi1149 Před 11 měsíci

    thanks for your video. BTW why did you choose to make AddressId both a PK and FK ? Couldn't you just keep the AddressId a PK for Address table and make additional EmployeeId column in Address table which can act as an FK referencing the Employees table ?

    • @ScholarHat
      @ScholarHat  Před 11 měsíci

      It's just for explaining the concepts. The relationships can be changed.

    • @owaiskhanafridi1149
      @owaiskhanafridi1149 Před 11 měsíci

      @@ScholarHat okay thanks

    • @rajesh35hsp
      @rajesh35hsp Před 2 měsíci

      @@ScholarHat this was confusing