Тёмный

Entity Framework Core 8: Improved JSON, queryable collections , and more… | .NET Conf 2023 

dotnet
Подписаться 294 тыс.
Просмотров 36 тыс.
50% 1

Entity Framework Core 8 (EF8) introduces several new highly-requested features, as well as major underlying infrastructure changes setting up EF Core for future enhancements. The new EF8 features include:
Chapters:
00:00 Welcome
00:44 Document vs Relational Databases
02:07 Use JSON to send multi-value parameters for translations such as `List.Contains`
03:15 Mapping and querying collections of primitive types
10:55 Mapping to JSON columns using SQLite
13:53 Leverage the new support for performance improvements, e.g. when using Contains
16:42 Use C# structs with DDD value object semantics in your classes while still splitting the contents to multiple columns in the database
23:58 Raw SQL queries for unmapped types
27:53 Official `HierarchyId` support for EF Core on SQL Server
33:29 In Summary Improvements to lazy loading and the change tracking APIs
36:02 Many small enhancements to existing features
aka.ms/ef8-whats-new
36:26 A MongoDB Provider for EFCore
aka.ms/efcore-mongodb
38:00 Thanks
- Further JSON support in relational databases, including:
- Use JSON to send multi-value parameters for translations such as `List.Contains`
- Mapping and querying collections of primitive types
- Mapping to JSON columns using SQLite
- Leverage the new support for performance improvements, e.g. when using Contains
- Use C# structs with DDD value object semantics in your classes while still splitting the contents to multiple columns in the database
- Raw SQL queries for unmapped types
- Official `HierarchyId` support for EF Core on SQL Server
- Improvements to lazy loading and the change tracking APIs
- Many small enhancements to existing features
Join Arthur Vickers and Shay Rojansky from the EF team for a tour of these new features, with demos showing the JSON mapping and queries, and value type support.
Download .NET 8 - aka.ms/get-dotnet-8
Hack Together - aka.ms/hacktogether/dotnet
Learn collection - aka.ms/learn-dotnet-8
.NET 8 Survey - aka.ms/dotnet-survey
Local Events - aka.ms/dotnetconf-local-event
Hero blog - aka.ms/dotnet8blog
Blog: aka.ms/dotnet/blog
Twitter: aka.ms/dotnet/twitter
TikTok: aka.ms/dotnet/tiktok
Mastodon: aka.ms/dotnet/mastodon
LinkedIn: aka.ms/dotnet/linkedin
Facebook: aka.ms/dotnet/facebook
Docs: learn.microsoft.com/dotnet
Forums: aka.ms/dotnet/forums
🙋‍♀️Q&A: aka.ms/dotnet-qa
👨‍🎓Microsoft Learn: aka.ms/learndotnet
#dotnet

Наука

Опубликовано:

 

31 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 42   
@davidmarron109
@davidmarron109 8 месяцев назад
I wasn't sure this would be worth 38 minutes of my life, but this is definitely worth it. Relational DBs solved a huge subset of problems, Doc DBs solved a different subset, and now you've taken a huge step towards merging both. This is important work you've done.
@MrStupiuno
@MrStupiuno 8 месяцев назад
I love the new inline primitive array support that works without any config!
@ShakeelAhmed-xo3xz
@ShakeelAhmed-xo3xz 8 месяцев назад
Wonderful new features, I have been using EF/EF Core for many years, but this video surprised me and my future work and projects shall benefit from this knowledge. Thanks you both.
@clouddeveloper4549
@clouddeveloper4549 8 месяцев назад
Well done! Solving real world problems and doing it in an elegant yet powerful way!
@IndigoDalliance
@IndigoDalliance 6 месяцев назад
Wow! Stunning! So glad I didn't miss this video.
@aqualinespirit90
@aqualinespirit90 8 месяцев назад
17:20 , this is really good, currently have to use predicates for that, glad it's been added to EF8.
@milada424
@milada424 8 месяцев назад
this is awesome, great work thank you !
@kabal911
@kabal911 8 месяцев назад
The best ORM in any language just keeps getting better ❤
@tarsisf8173
@tarsisf8173 8 месяцев назад
Fantastic job!
@janakaaravinda2507
@janakaaravinda2507 7 месяцев назад
This is amazing thank you..
@gustavnilsson6597
@gustavnilsson6597 8 месяцев назад
You guys are rockstars!!
@derDooFi
@derDooFi 8 месяцев назад
i love these guys! wish this were longer, lol
@keinegutennamen
@keinegutennamen 8 месяцев назад
Definitely one of my favorite talks.
@onlyice
@onlyice 8 месяцев назад
Brilliant presentation.
@pureevil379
@pureevil379 8 месяцев назад
Brilliant
@mamg301988
@mamg301988 8 месяцев назад
Excellent, I'm going to update the version
@OggVorbis69
@OggVorbis69 7 месяцев назад
Excellent work,. all the time it was said that RDBMS do not have concept of arrays I was thinking ... Postges?? the end clarification that the native capabilities are used there was just the cherry on top of very impressive work. Well done guys, I just enjoy seeing you two on my screen. Congratulations on the cool set of examples and their order. I was thinkin that the sample with at least one visit will be better written with IS NOT NULL, with more than one will be where the Visits column value length is > than the length of textual form of a single date, etc. but those are hacks in comparison with your clear / canonical solution. Hacks may be faster but the understandable and always working code is better, even when generated. Thanks a lot. I may just start using EF now. It is good enough for me not writing all my SQL by hand. And that is something keeping in mind I am doing it since SQL server 4.2 Again, thanks a lot. Your work should be a pleasure to use.
@SchattenPV
@SchattenPV 4 месяца назад
Can you please give me a link to the video you mentioned @22:05? I'm very interested about the join aspect because we have some perf problems in our app with this topic
@dvanrooyen1434
@dvanrooyen1434 8 месяцев назад
Hey guys - before we had table params we used that hack of using xml to pass in lists, - its not a new technique...
@asdasdaa7063
@asdasdaa7063 4 месяца назад
I love these guys so much, Microsoft's best speakers! Thanks for this love EF core!
@Joooooooooooosh
@Joooooooooooosh 7 месяцев назад
Unfortunately anything with JSON arrays can't be effectively indexed. Most of these queries will perform terribly on any large tables.
@jaiderariza1292
@jaiderariza1292 Месяц назад
@ajcvickers I wonder how we can handle discriminator with json, example if address in UK may have different format that address in US and we use like interface (IAddress) or base abstract class , silly sample but I wonder if this can be achieve by the new EF core json support?
@HikingUtah
@HikingUtah 6 месяцев назад
What version of SQL Server first supported keywords such as OPENJSON? This is my first time hearing about it.
@pascalmbamungu3432
@pascalmbamungu3432 7 месяцев назад
What's the datatype for the column holding the json array?
@GregMontoya1
@GregMontoya1 8 месяцев назад
Automatically converting a .NET primitive array to a JSON formatted array as a parameter for a query is pretty nice. Now I won't have to do this manually.
@jeremyflowers8908
@jeremyflowers8908 7 месяцев назад
Why are you guys not using CTEs or top instead of first for consistency when working with JSON (I'm presuming you are borrowing from Observables)? Also where are you storing the metadata to know what the composition of the JSON columns are within the database?
@zapaneer
@zapaneer 7 месяцев назад
Cool stuff. The section about collections of simple datatypes being mapped as JSON, does that apply to the Postgresql variant as well or does it natively support the Postgresql implementation of arrays (which I believe would be more efficient)? Maybe it is a question for the NPGSQL guys...
@zapaneer
@zapaneer 7 месяцев назад
Sry, It got answered later on by Shay
@infotips2475
@infotips2475 6 месяцев назад
How to handle it when 'Address' has another object? Does anyone have any ideas for configuration?
@goodstas
@goodstas 7 месяцев назад
Thank you for this video. Great features. Could you provide the code of your presentation, please?
@thedreadedgman
@thedreadedgman 7 месяцев назад
is JSON parsing faster then query planning?
@maxd5661
@maxd5661 8 месяцев назад
We have similar code running on SQL Server in production without EF (using direct SQL) and performance on larger data sets (few hundred thousand records) is terrible. Stay away from this on SQL Server if you are at all concerned about performance. SQL Server at its core is very behind the curve on native array and document support. This should work great on PostgreSQL though!
@OggVorbis69
@OggVorbis69 7 месяцев назад
Yeah, it is cool to write the query but performance is always an issue when the volume comes.
@Joooooooooooosh
@Joooooooooooosh 7 месяцев назад
Exactly. So much work was put into a feature that is pretty much an antipattern in the real world.
@maxd5661
@maxd5661 7 месяцев назад
@@Joooooooooooosh I mean at least it will actually work well on PostgreSQL. Maybe when SQL Server catches up to 2023 with native array and document support this will be a thing, but until then, this is a total waste of time of the EF team.
@xtonetware5493
@xtonetware5493 5 месяцев назад
will this work exact same way for postgre sql
@savopejovic25
@savopejovic25 8 месяцев назад
This is not just SQL Server? Oracle has no support yet...
@gunnarliljas8459
@gunnarliljas8459 8 месяцев назад
Cool, but just mentioning "perf" so briefly kind of falsely gives the impression that this JSON support is usable in anything but extremely small databases. It isn't. The JSON_VALUE thing can be indexed, but the collections not so much. PostgreSQL kind of handles it. The contains optimization is great, but something that has been solved by other OR mappers years ago. Still, good to see.
@ericblankenburg
@ericblankenburg 8 месяцев назад
But you don't support Cosmos Db hierarchical partition keys. You always seem to be way behind the curve when it comes to Cosmos Db.
@rivercitron2000
@rivercitron2000 8 месяцев назад
What could go wrong
@codefoxtrot
@codefoxtrot 8 месяцев назад
Talk about flying too close to the sun... jeez, just bring a plague down on us all, why don't you?!
@ivanz6368
@ivanz6368 5 месяцев назад
what a useless video....
Далее
What's New in C# 12 | .NET Conf 2023
35:28
Просмотров 55 тыс.
Making Entity Framework Core As Fast As Dapper
13:17
Просмотров 84 тыс.
Common mistakes in EF Core - Jernej Kavka - NDC Oslo 2023
1:03:43
Reverse proxying is easy with YARP | .NET Conf 2023
29:46
Testing Entity Framework Core Correctly in .NET
8:03
Entity Framework Core vs Dapper Performance in 2023
13:59
How Entity Framework Tries to Copy Dapper in .NET 8
9:46