Modern Entity Framework: A Tour of EF Core 5.0 pt 1

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ม.ค. 2025

ความคิดเห็น • 17

  • @leknyzma
    @leknyzma 4 ปีที่แล้ว +2

    Arthur knows his stuff

  • @zoran123456
    @zoran123456 4 ปีที่แล้ว +7

    Honestly, I always use the "database first" approach and generate code manually (I know there is a command-line utility but don't care about it). I really love EF Core and it made my development days soooo much easier. I would never use anything else. Very happy with it. Although, once you start working on complex queries, you are really better of doing stored procedures, as complex SQL Linq queries are PITA and very confusing.

  • @Michael-London
    @Michael-London 4 ปีที่แล้ว

    Question. I have noticed today that I no longer need to use ‘ThenInclude’ for including objects from properties at multiple levels down. For example query.Include(x=>x.User.Address) works absolutely the same as query.Include(x=x.User).ThenInclude(u=>u.Address)
    If true this is so handy. Am I right or have I missed somthing?

    • @sebastianfjastad7928
      @sebastianfjastad7928 4 ปีที่แล้ว +2

      The .ThenInclude() is to include a "many" relationship. Your User.Address is 1-1

    • @Michael-London
      @Michael-London 4 ปีที่แล้ว +1

      @@sebastianfjastad7928 thanks!! Not sure how I missed that after a couple years of using efcore ☺️

  • @akovac35
    @akovac35 4 ปีที่แล้ว

    EF Core team is raising the bar again!

  • @jpboy1962
    @jpboy1962 4 ปีที่แล้ว

    Arthur said it right "EF Core is used to store your C# objects to a database". So many people think ORMs are for accessing databases from their programs. A small but very important distinction.

  • @pedroferreira9234
    @pedroferreira9234 4 ปีที่แล้ว +6

    why not just use "private set;" doesn't that make it read only ?

    • @MAXMAFFIA2013
      @MAXMAFFIA2013 4 ปีที่แล้ว +1

      That only means you can never set it outside of the class but if you have a public function inside the class that can set it

    • @pedroferreira9234
      @pedroferreira9234 4 ปีที่แล้ว

      @@MAXMAFFIA2013 ik that, i just think if the main goal is to not change outside the class private set works the same way.

    • @wesc6755
      @wesc6755 4 ปีที่แล้ว

      @@pedroferreira9234 There are a thousand ways to do everything. If he made a private set property, someone would have asked why not make it readonly. Sometimes it makes no difference at all; sometimes it's an important choice. For this tutorial... who cares.

  • @everyonesview
    @everyonesview 4 ปีที่แล้ว

    Superb!

  • @Xorgye
    @Xorgye 4 ปีที่แล้ว

    Nice seeing some C#9 stuff and F# crossover like the immutable stuff.
    But that 'include' magic though... 😲

  • @dotnetdevni
    @dotnetdevni 4 ปีที่แล้ว +1

    It would be good to get the new version to have a designer like the old ef did for new people it’s Easier to understand