Entity Framework Core Tutorial - Everything You Need to Know to Get Started

Поделиться
HTML-код
  • Опубликовано: 12 дек 2024

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

  • @amantinband
    @amantinband  2 года назад +23

    Although there are many other great topics (such as relationships) that I didn't cover, I will cover them in-depth with complex examples in the upcoming videos in the number dinners series.
    In any case, I would love to hear what you think and other topics you would have liked to see in this video!

    • @DrHeinzDoofenshmirtz
      @DrHeinzDoofenshmirtz 2 года назад +2

      Hi Amichai. Great video and good starter before you go in-depth!
      I would specifically really like you to explain relationships, meaning how do I configure a relationship when I want my class to be as DDD-like as possible.
      And then also how to work with Migrations in a production environment correctly. I understand that you should actually get EF make scripts that are run manuelle or through a pipeline.
      Another topic I would really like to here about is how User should be thought into the domain. I use Auth0 and can't figure out if User is a domain object, or if it is something else. And then I would also like to know how to set identity up correctly. A totally different topic than EF though 😊

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

      Can't wait for the next video in the Buber Dinner Series. Thanks for sharing! I don't know about others, but I would find your videos to be easier to follow if they were just a bit slower paced (for example Tim Corey goes at the perfect pace to code along while watching his videos), and I would prefer longer videos with less co-pilot auto completions and full visibility of all the code typed (boring or not). I know we can't always get what we want, but I did find enough value in your content to become a Patreon :) Anyways thanks again!

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

      I love your videos and have a small request. Can you show a few more lines of code, like 20-25? You are quite the expert and move very fast, I find myself having to stop and forward/rewind videos frequently because the lines of codes you are typing in don't stay on screen long enough. Looking forward to more of your videos!

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

      I love your tutorials because you've got real world experience and it shows in the way you introduce your application with some consideration of architecture. There are too many cookie cutter tutorials out there that don't offer nearly as much value as yours. Keep the in-depth videos coming!
      One thing I want to know is how you came up with this app idea of private breakfast events. I've never heard of such a thing lol!

  • @manaralkammessy6360
    @manaralkammessy6360 2 года назад +19

    I cant wait for Domain Layer and EF interaction video!!

  • @forzafaruandrei
    @forzafaruandrei 2 года назад +10

    The moment I see Amichai posted a new video, I know for sure that I'll learn something useful and interesting

  • @Pachwara
    @Pachwara 2 года назад +3

    Thank you, Amichai. I can't wait for the video where you link DDD and EF Core together. Keep it up

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

    Really good video. Using additional diagrams to show how the concepts worked really helped as it gives a different perspective to just seeing the code

  • @jamesevans6438
    @jamesevans6438 Год назад +4

    Hey Amichai, absolutely awesome video, thank's so much for the many days it must have taken to put all this together, really liked the flow of design through to implementation, this is better than any dedicated entity framework course I have seen too! - learnt a tun of stuff on this one - I'll be watching this a number of times I think to understand everything. I think this will be really useful to lots of people trying to link DDD to the database via entity framework.

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

      Thanks, James, really appreciate it 🙏🏼

  • @sauravbhatta5303
    @sauravbhatta5303 2 года назад +3

    I also recommend you to go over in details regarding one to many and many to many relationship in EF core using the diagram.

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

      Do you mean presenting the relationships via a model diagram in Visual Studio?

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

      @@amantinband absolutely

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

    Perfect playback speed, you know us man :D Your content is cool! That's the beauty of learning from experienced seniors. I hope you keep posting regularly.

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

    From this video I learned very important skill- to shift rows up and down with a cursor in fast neurotical way. ;-)

  • @caiolopes8693
    @caiolopes8693 2 года назад +2

    Great Video Amichai! Can you do a video explaining how to use EF Core for an existing Data Base? I mean, using EF Core with a DB first approach. Thank you!

    • @amantinband
      @amantinband  2 года назад +3

      It's already in my list 💪🏼

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

    Great intro to EF!

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

    Just have a performance feedback, but first thank you for such an awesome video, I've subscribed. Okay so when you insert lots or rows with Guids defined in C# as Ids, because those values are random, Microsoft Sql Server will have to work hard to place them in the right index location as it inserts each row into the table, if you run a test where you are inserting thousands of rows, you may see a noticeable performance degradation. So I would recommend using int or bigint and let sql server generate the key as autoincrement. If you really want to stick to guids then you can configure them to be autoincrement in sql server and let sql server generate it for you, then you will see that the guids will look very similar one from the next, but that's a configuration on the sql server side, not sure how you would do it on EF, but yeah all good, thank you, awesome video

  • @juke-duke
    @juke-duke 2 года назад +2

    How do you have the option to sync namespace with the folder you are in when moving it around?

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

      I have a vscode extension called "C# Namespace Autocompletion" that I use for defining namespaces (I usually use the namespace-fill option)

    • @juke-duke
      @juke-duke Год назад

      @@amantinband I use the extension aswell, but Im talkong about you had this option say like to sync the namespace with the folder structure. You moved a file to another folder and were able to match the namespace and change it everywhere, I have to manually go and change all my namespace references when I move the file around. How did you do this, and thank you.

    • @juke-duke
      @juke-duke Год назад

      @@amantinband Any information on this would be greatly appreciated, it definitely helps refactoring on vscode so much

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

    Don't get why the properties must be made private regardless of the fact that EFCore iterates over the properties and adds them to the migration definition. I mean why must they be private? And why must we have an empty constructor for Breakfast for EfCore to work? Timestamp: 17:56

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

    Is there any particular reason you prefer doing the configuration of entities in a fluent way instead of using data attributes?

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

    Thansk Amichai! Good video for beginners in the world efcore

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

    Where does this course start from? what is bubber breakfast app?

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

    really clean workflow

  • @unhandledexception1948
    @unhandledexception1948 5 месяцев назад

    Would be curious to hear why you chose a Mac as your OS ?

  • @LuxuryLifestyle1
    @LuxuryLifestyle1 2 месяца назад

    i hope if there's more content like that

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

    thanx bro , can u make a video to explain Backing Fields in EF Core

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

    absolutely love your videos!! I see you have intellisense in the terminal as well, how is this done, on windows?

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

    Can you please tell me what extension do you use to suggest the code pieces ? thx a lot

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

    What software did you use to draw the diagrams?

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

    Hey Amichai,
    I've been following your previous video about implementing the different aggregates in ddd. How would I approach the saving and loading of the different id types through ef core?

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

      Let me know of you still need help with this after today’s video 🙂

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

    Thank you for your video, Amichai! Can you tell me what a program that let you do arrows and rectangles on your screen?

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

      And one more question is why are you using .Find() not FirstOrDefault() or SingleOrDefault()?

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

      @@DENDYTWOO Thanks! I use Presentify on MacOS, and ZoomIt on Windows

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

      Regarding Find vs FirstOrDefault, Find will avoid calling the DB if it can. Here are some more details: stackoverflow.com/a/58779047/10091553

  • @the-nasim
    @the-nasim Год назад

    Great video. I have a question is it a bad idea for having multiple DbContext for a single database. One for ReadOnly, one for WriteOnly.

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

      If you use it only like that, I don't find a problem with that. But I think it's an overkill if you don't have a very big enterprise application. If you do have that kind of app, maybe it would be better to use replica counts.
      Replica counts are a way to have multiple databases of the same data. This saves you a lot of time, if you have let's say a lot of writes, since the DBs put a lock both on read and on write when a write is made to the Database.
      So, by using replica count, you can have only one database to only make writes, and another 2 or 3 replicas of the first db that are used only to make reads.
      Hope I've made myself understood

    • @the-nasim
      @the-nasim Год назад

      @@andreistelian9058 Thanks for your very helpful answer. I didn't know about replica count. I find this very interesting. I will take a look. Again many thanks.

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

    I really wish we could use EF Core but as far as I know, it does not support the database my company is stuck using - IBM for i or DB2 iSeries (or whatever it’s called these days).
    To make it worse we are stuck on version v5r4! 😢
    Does anybody know if EF Core can be used for this as I haven’t been able to find anything for years.

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

    Thank you!

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

    Thank you for many explanations, Amichai, many concepts are clear now. What I do still find confusing is why ChangeTracker marks entity as unmodified if its collectoin changes (navigation property). Is this intentional?

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

      Thanks, Boris. The change tracker is for EF Core to know what tables to update. It helps to think of the underlying tables and what data needs to be deleted/modified/added

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

      @@amantinband It actually makes sense, thank you for your reply. Any tips on where to look for the original values for collections (kind of like in properties in change tracker)?

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

    Can you give us a little spoiler about using EF on the DDD Project?
    (I am guessing that you are gointg to create some kind of model classes to satisfy EF on the infra layer + using mapster to map them to domain classes)

    • @amantinband
      @amantinband  2 года назад +2

      Sure 😁 The configuration files are the mapping between the domain models and the actual database. I don't think another anti-corruption-style set of models is needed.

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

    Amichai are you Armenian? 😊

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

      Nope, I'm Israeli 😎 what made you think?

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

      @@amantinband 14:22

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

      @@narekhovhannisyan6362 haha no it stands for Amichai Mantinband

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

    What is the point of studying if you are going to replace us all?

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

    What happened to your voice?

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

    This is borderline unintelligible