What's New in EF Core 6

Поділитися
Вставка
  • Опубліковано 17 січ 2025
  • aka.ms/dotNETC...
    EF Core 6 is a cross-platform object-mapper that enables C# developers to use domain classes and strongly typed LINQ queries to interface with a backend database. EF Core 6 is the latest version that features performance improvements, support for temporal tables, cloud-native-friendly migration bundles, improved handling of complex queries and substantial improvements to the Azure Cosmos DB provider. See these new features in action and learn when to use them and why they are helpful in this demo-packed session. 👨‍💻 Slides & code: aka.ms/dotnetc...
    🎉 .NET 6 Release Blog: devblogs.micro...
    ⬇ Download .NET 6: aka.ms/dotNETC...
    🙋‍♀️🙋‍♂️ Get your questions answered on the Microsoft Q&A for .NET: aka.ms/dotnet-qa
    💭 Join the .NET Tech Community Forums: aka.ms/dotnet/...
    🏫 Learn C#, F#, and .NET with free self-guided learning from Microsoft Learn: aka.ms/learndo...
    #dotnet6 #dotnetconf #dotnet

КОМЕНТАРІ • 33

  • @xucongzhan9151
    @xucongzhan9151 3 роки тому +9

    The performance improvement looks exciting! Thank you for the great work!

  • @aarontheeranitpongtongmuan233
    @aarontheeranitpongtongmuan233 3 роки тому

    Thanks for great work to .NET EF team.

  • @ChrisBoot
    @ChrisBoot 3 роки тому

    Seriously impressive guys. Glad I caught this video - will help out my team so much!

  • @AndersonPhiriPAC2
    @AndersonPhiriPAC2 3 роки тому +3

    Temporal tables, making sql server and all ef core supported providers , an event store db. Oohsome 😍

    • @MiningForPies
      @MiningForPies 3 роки тому

      Most exciting update I’ve seen in ef

  • @bluewilliams1932
    @bluewilliams1932 3 роки тому

    Impressive stuff gang! Keep doing what you’re doing!

  • @RoundTheCode
    @RoundTheCode 3 роки тому +1

    Like the temporal table support in Entity Framework. Getting historical data through Entity Framework is going to come in very handy.

  • @bar10dr
    @bar10dr 3 роки тому +1

    The bundle .exe file should have a datetime in its name, so there is no confusion later on. Great work!

    • @BKearal
      @BKearal 3 роки тому +1

      Just specifiy the name with -o

  • @grumpydeveloper69
    @grumpydeveloper69 3 роки тому +5

    Loving the ef migration bundle option. bacpac and sqlproj is nice but also requires custom code to get complex database changes to wkr with existing data. Now you can at least have more of that code in c# as part of the migrations. Still custom built but now in C#/EF

    • @DuelingTreeMike
      @DuelingTreeMike 2 роки тому

      Actually there’s a better way for complex databases. Database projects are still the best option because EF migrations often run into trouble when you have multiple developers. If you use the migrations, just realize you will have to deal with the fact they will have to be in source control and will encounter merge conflicts.
      My teams enjoy the success with a “source first” approach for version control and change management, as well as version control with software releases. Database projects, when used correctly in conjunction with SqlPackage.exe, is a very powerful combination to achieve 100% success on your database migration across environments and spin up sandboxes.
      What is “source first”? Starts with the database project that contains the source code for generating the db schema. The db project can be from an existing db schema import. Then in VS schema changes can be made there. (Note: NO SQL Server Management Studio! Not needed).
      To sync your Dbcontext, use the dot net scaffold command line. Boom! Models are updated! VS will then may show you errors which show you exactly where you need to refactor.
      Now here’s the magic. When your app builds and your DB project is in the solution, you cannot only publish your app that’s in synch with your database, you can hand off the .dacpac to the dba and he’ll use a .batch file to deploy the dacpac to the specified environment (such as a test environment) and with next to no effort go right to production!
      Works like a dream from tiny databases up to databases with 500+ tables and thousands of stored procedures and views. All with a 100% success rate. I’m sorry but ef migrations cannot reliably get those type of results.
      I LOVE EF CORE! And I really enjoyed this video! Btw, hey Scott! Great to see ya! Ever gonna have the VS team implement the code/bookmark feature? ;-) (I see they did in fact add a search feature to the task list (one item we talked about in an email a century or two ago. Lol)

  • @S3Kglitches
    @S3Kglitches 3 роки тому +1

    Is there a way to disable hiding join tables (M-N) relation with EF 6? I sometimes need to create instances of these classes because they are pointers referring to existing entities.
    I have to scaffold using EF 5 to have my M-N tables there!
    ConfigureConventions looks brilliant!
    when GUI for migrations?

  • @rasmush.hansen1786
    @rasmush.hansen1786 3 роки тому +1

    Bravo boys! Bravo!

  • @Erril_Ferndal
    @Erril_Ferndal 2 роки тому

    Thanks guys! Amazing!

  • @RtoipKa
    @RtoipKa 3 роки тому +6

    I don't understand how bundles are more useful than just generating migration script and executing it at the time of deployment. At least there is some script to check, with just exe there's no way to verify what's there in PR or as part of deployment approval.

    • @glennarens81
      @glennarens81 3 роки тому

      I think the idea is that you do your code reviews against the migration scripts. Then once it has been approved in your pipeline you generate the bundler and apply it in deployment.
      If your code does an ef core migrate at startup you could get issues if for example you run three instances of your code. Also if you scale your code with the bundler you don't have to check at startup if the dB is up to date.

  • @TriativeHD
    @TriativeHD 3 роки тому

    Great improvement! @7:32 you said Configure Conventions can be override by attributes or Fluent API, that is not my experience, Pre-Convention Model Configuration always overrides attributes you can only override Pre-Convention with Fluent API which is kind of of sad. I prefer using attributes to set thing like MaxLenght. This makes Pre-Convention Model Configuration less useful for me, rather than overriding everything, it should only apply to properties with the default convention in tact, any property with modified convention through attribute or Fluent API should be skipped by the Pre-Convention configuration

  • @dotnetdevni
    @dotnetdevni 3 роки тому

    Why must we still use extensions for bulk inserts

  • @leakyabstraction
    @leakyabstraction 3 роки тому

    Can we now set the startup project for dotnet ef commands without having to specify it for each execution? :P

  • @yasse.659
    @yasse.659 3 роки тому

    Great! Thanks for this new version

  • @ramashankar2750
    @ramashankar2750 3 роки тому

    Json Columns not included in this release.

    • @MiningForPies
      @MiningForPies 3 роки тому +1

      Good. If you want to store JSON data, don’t use SQL!

    • @RtoipKa
      @RtoipKa 3 роки тому +2

      @@MiningForPies check Marten. It does exactly this but in Postgres

    • @Xorcist77
      @Xorcist77 3 роки тому +3

      @@MiningForPies Sometimes it is relevant to store JSON or XML columns (hence their existence). We use them when writing logs (via Serilog) to databases, being able to effectively query those logs them from the application without dropping down to query text would be nice. Presently we have to unroll many properties/attributes into their own columns just to allow basic querying for audit purposes.

    • @MiningForPies
      @MiningForPies 3 роки тому +1

      @@Xorcist77 seen that in action. And why people do that when things like seq are available is beyond me.
      Use a relational database for relational data, when not then don’t.

    • @Xorcist77
      @Xorcist77 3 роки тому +1

      @@MiningForPies Believe it or not, sometimes we just have to bend to the will of the client. There have been numerous times in my career that the client hasn't wanted to license or support additional software like SEQ or Elasticsearch (which add complexity and cost to the project). The key takeaway is that having the additional support of JSON/XML column querying would make the codebase better for the developers in cases like these. I'll leave it at that.

  • @AljRest
    @AljRest 3 роки тому +2

    Nice, But talk about incompatibilities next time.....

  • @rizaanjappie
    @rizaanjappie 3 роки тому

    Lenovo all the way, btw