[00:00:06] Good morning, good afternoon, good [00:00:07] evening, whenever you are. [00:00:10] Welcome to .NET Conf 2026. [00:00:13] My next session is going to be talking [00:00:16] about EF Core 11, which is obviously [00:00:19] going to be released together with .NET [00:00:22] 11. My name is Jerzy Chinchella. I work [00:00:25] as a senior software engineer [00:00:28] exactly working on EF and I will be [00:00:30] talking about the most significant [00:00:33] changes and new features we created in [00:00:36] EF Core 11. [00:00:38] So I will bring a couple of areas around [00:00:41] what we've done and improved and what is [00:00:44] interesting and I will link to a [00:00:47] document that will [00:00:49] give you all of the changes, even the [00:00:51] smaller ones. [00:00:52] So let's bring with the basics. As I [00:00:54] said, EF Core 11 ships with .NET 11 as [00:00:58] expected and also targets .NET 11. The [00:01:01] main areas of focus for us were [00:01:03] obviously vector search, AI, and search [00:01:06] in general. [00:01:07] Then as with every version, we improved [00:01:10] the link translation and SQL [00:01:12] translations to hopefully provide [00:01:14] better queries that will be [00:01:17] faster and less resource hungry on the [00:01:20] database side. [00:01:22] And then we also improved the overall [00:01:24] like runtime migrations, tooling, [00:01:27] modeling scenarios around it. [00:01:29] Finally, [00:01:31] across the EF Core 11 development cycle, [00:01:34] we received a lot of [00:01:37] community contributions, some small, [00:01:39] some big. We definitely value every [00:01:42] single one of those. So thank you for [00:01:46] the community community contributions [00:01:47] and we are very excited about having [00:01:50] such a great and engaged community with [00:01:53] EF Core. [00:01:55] So let me jump directly into the link [00:01:57] and SQL improvements. [00:01:59] There's a list of uh some features that [00:02:01] I want to talk about, but instead of [00:02:03] talking about those, let me jump into my [00:02:06] demos directly. [00:02:08] And what I will do is start with a bunch [00:02:11] of my demos that I prepared. I have one [00:02:13] though first that's the vector search. [00:02:16] That basically means that we are now [00:02:18] able to do searches in databases that do [00:02:22] support vector search, both the kind of [00:02:25] brute force and also the uh indexed [00:02:28] usage, which is usually using something [00:02:30] like disk ANN on the database side. [00:02:34] Let me bring this uh [00:02:37] into the configuration. So what I have [00:02:39] in here is a standard block uh and and [00:02:42] posts uh demo we are using, but in this [00:02:45] case my entity has extra embedding [00:02:48] column, which is a type SQL vector of [00:02:51] floats. [00:02:52] This property is configured as a [00:02:54] as a vector index. It has a metric with [00:02:57] the cosine uh and the type is disk ANN. [00:03:02] Simple as that. [00:03:03] In my queries, I will first do something [00:03:07] that we would call brute force search. [00:03:09] It's using the nearest neighbor search, [00:03:13] but it's checking every single [00:03:15] uh distance uh not using the index. So [00:03:18] that's this vector search function where [00:03:20] I'm specifying that I will be using this [00:03:22] column in this [00:03:24] uh in this case called embedding, and my [00:03:26] question is just hard coded, just a demo [00:03:29] vector that I created, and the distance [00:03:32] I'm using is the cosine. [00:03:34] We will see the query in a in a moment, [00:03:36] uh but this one as I said will use the [00:03:38] brute force approach. The next one has [00:03:41] this special clause with approximate, [00:03:44] which will be translated into the [00:03:46] matching part on the SQL Server side [00:03:48] because I'm using SQL Server here as a [00:03:50] as a database. [00:03:52] And now this will use the index on the [00:03:54] database side. It will not give me the [00:03:56] absolutely specific precision uh for the [00:04:00] distance between those two vectors, [00:04:02] hence the name with approximate, but it [00:04:04] will use the index and will be way, way [00:04:05] faster than brute forcing through each [00:04:08] and every column and computing the [00:04:10] distance. [00:04:12] And finally what I have in here is [00:04:13] something that we would call a hybrid [00:04:15] search or combined search where I'm [00:04:17] combining my vector search, my [00:04:20] similarity search together with a normal [00:04:23] relational data relational database and [00:04:25] filtering on columns and stuff like [00:04:27] that. For example here I'm filtering on [00:04:29] the published on [00:04:31] so I want to have only posts that that [00:04:35] are similar to my question but also are [00:04:37] published after January 1st 2026. [00:04:42] So let me start this one [00:04:44] and [00:04:45] hopefully we will see the queries [00:04:49] how they look like. I will make it [00:04:51] slightly bigger so we can actually see [00:04:53] it. [00:04:54] So the first one is using on SQL Server [00:04:56] the standard vector search function, [00:04:58] nothing specific about it. We are [00:05:00] passing the cosine and we are ordering [00:05:02] by distance. This is the brute force [00:05:04] approach and you can also see that when [00:05:06] you are running this query we will give [00:05:09] you a warning saying hey you are using [00:05:11] vector search but you are not calling [00:05:13] the with approximate. It might be what [00:05:15] you want, probably not because it's not [00:05:16] using an index. Also you will get this [00:05:18] warning and obviously you can [00:05:21] make this warning an error or you can [00:05:23] hide it in case you know what you are [00:05:25] doing. [00:05:26] In case I use the with approximate the [00:05:29] clause for SQL Server slightly changes [00:05:31] meaning there is the with approximate [00:05:33] and the index will be used. [00:05:35] Finally the translation for using these [00:05:38] two features together meaning the filter [00:05:40] on a normal column from a database and [00:05:43] also the with approximate inside my [00:05:46] query. So I can filter for example [00:05:48] region or specific user or something [00:05:51] like that and then do the distance and [00:05:54] the approximate search. [00:05:56] My next demo is similar and it's using [00:06:00] the full text search that we have [00:06:02] available as well. What we have [00:06:04] specifically for SQL server are two [00:06:07] functions, free text table that allows [00:06:09] you to do the the normal like a text [00:06:12] search and a contains table that allows [00:06:15] you to do stuff with a little bit of [00:06:17] predicate. So for example, I have here [00:06:19] the and and a wildcard and stuff like [00:06:22] that. [00:06:24] Then I will just join it as I would do [00:06:26] in a normal SQL using the key and then I [00:06:29] will be ordering it by the rank itself [00:06:32] and selecting just 10 items. Simple as [00:06:35] that. The definition itself is [00:06:37] specifying that I have a full text [00:06:40] catalog and I am specifying the full [00:06:43] text index on title and content columns. [00:06:46] Nothing more, nothing less. Again, if I [00:06:49] run this [00:06:50] this demo, we will see that it's [00:06:52] translated nicely into the calls for the [00:06:54] SQL server. So there's a free text table [00:06:57] and here is my contains table and that's [00:07:00] it. [00:07:01] That's not like you cannot use this [00:07:03] before. You definitely could use this [00:07:04] before, but it was like a stored [00:07:05] procedure or something like that. Now [00:07:08] you can do it directly from your link [00:07:10] statement. [00:07:13] So [00:07:14] another small feature that kind of [00:07:17] blends into [00:07:19] supporting the new features that were [00:07:21] introduced in link in the runtime is a [00:07:24] full join function. So recently in [00:07:29] last versions [00:07:31] the left join, right join and now full [00:07:34] join were introduced. Also the max by [00:07:37] and min by functions and few others. [00:07:39] And we do support those now. So if you [00:07:41] are using these for example link to [00:07:43] objects and you want to switch into the [00:07:44] database and you want to have the same [00:07:46] query, you can do it in this let's call [00:07:48] it shorter way using the full join [00:07:50] because if you try to do it before [00:07:52] without the the full join function, you [00:07:55] need to do a little bit of dance with [00:07:56] bunch of calls and stuff like that. It's [00:07:58] not super [00:08:00] super convenient. And now when I see dot [00:08:03] full join, I immediately see what's [00:08:05] happening in there and I can understand [00:08:07] what's there. [00:08:09] So that's the that's the fusion function [00:08:12] and the same is for the max by and min [00:08:15] by that I have in here as well. You can [00:08:17] check the demos later. I will just jump [00:08:20] directly into a next feature which is a [00:08:22] JSON feature JSON functions like JSON [00:08:25] contains and JSON path exists. So what I [00:08:28] have in here is a new function that's [00:08:30] available on EF functions. One of those [00:08:32] functions is JSON contains and the other [00:08:35] is JSON path exists. [00:08:38] As the name would be in the SQL server [00:08:41] similar stuff we can use them in a where [00:08:43] clause and filter on those and so on. [00:08:46] But also if I set my compatibility level [00:08:50] to high enough value in my case 170 for [00:08:53] the SQL server and when I am using these [00:08:56] contains calls on my [00:09:00] collections that are stored as [00:09:04] complex properties or primitive [00:09:06] primitive arrays. In one case it's the [00:09:08] list of string and the other one is list [00:09:10] of integers. [00:09:12] We will use the function directly and [00:09:15] translate it into this let's say better [00:09:17] way instead of expanding into table and [00:09:19] filtering in a table and so on. So let [00:09:22] me run it again so we can actually see [00:09:24] how it looks like. [00:09:28] So the first one just translates [00:09:30] directly into the JSON contains. Let me [00:09:32] put it side by side so we actually see [00:09:34] the code. [00:09:35] Then we have the JSON path exists again [00:09:38] more or less direct translation. But the [00:09:41] third one is the one that I'm actually [00:09:43] happy about because now you don't have [00:09:45] to worry about which function to use and [00:09:47] how is the syntax. I just use dot [00:09:49] contains and we use the JSON contains [00:09:52] function [00:09:54] on the [00:09:55] proper column with the proper parameters [00:09:57] and so on. So you can focus on the query [00:10:00] itself and not on the details of how it [00:10:03] actually should be filtered and and [00:10:05] stuff like that. [00:10:07] And finally my last demo is about join [00:10:13] pruning that exactly fits into what I [00:10:15] described before that you just want to [00:10:18] use EF Core and we are making sure that [00:10:20] the queries that we are generating are [00:10:23] better, shorter, more performant and you [00:10:25] don't have to [00:10:26] do the nitty-gritty details. [00:10:28] And before I [00:10:31] show you the result, let me quickly [00:10:34] switch into the old version of .NET 10 [00:10:38] and run my demo. What my demo is is that [00:10:42] I have a customer, I have a coupon and I [00:10:44] have a order kind of a normal [00:10:47] shop [00:10:48] context, let's say, and when I want to [00:10:53] do the full report on orders and [00:10:55] customers and coupons being used, I just [00:10:58] do orders join left join and that's it. [00:11:02] If I'm using basically all of the data [00:11:05] like orders and customers and coupons [00:11:07] from the query, I obviously need both [00:11:10] joins. But strictly speaking, when I use [00:11:13] just order for example from this query, [00:11:16] I don't need customer, I don't need [00:11:17] coupon. In this case, the joins or some [00:11:20] of the joins are not needed in this case [00:11:22] both. So it could be removed. [00:11:25] In previous EF version, [00:11:28] both of those queries [00:11:30] I just need to rebuild it again because [00:11:33] it was running with 11. [00:11:35] Both of those queries contain [00:11:38] the joins, the first one and the second [00:11:41] one. [00:11:42] And as I said, on the second query, [00:11:44] these joins are not needed meaning the [00:11:46] database needs to do extra work for [00:11:48] nothing. If you're lucky, the database [00:11:50] optimizer will figure it out and say, [00:11:52] well, I actually don't need to do this [00:11:54] because XYZ. [00:11:56] But still it needs to be sent to the [00:11:58] database. You are relying on the [00:11:59] optimizer. The query might be slightly [00:12:01] complex in the real world and the [00:12:03] optimizer will say, no, no, no, I need [00:12:05] to do the join, I need to figure it out [00:12:07] and so on. [00:12:08] So if I switch into the 11 [00:12:13] and rebuild the application [00:12:15] and run it again, we will see [00:12:20] that now on the second query does not [00:12:23] need the customer does not need the [00:12:25] coupon. We actually just produce the [00:12:27] query and we don't need the inner join [00:12:29] and left join there, so we are not even [00:12:31] generating it. [00:12:32] This is a specific case that does not [00:12:33] mean that the inner join or the left [00:12:35] join or right join is not needed every [00:12:38] time. Obviously there are queries like [00:12:39] the previous one where it is needed, [00:12:42] but it's definitely nice to see that [00:12:44] some queries will for you get [00:12:47] like easier, shorter, hopefully more [00:12:49] performant without you doing anything. [00:12:52] We just figured out in the runtime and [00:12:54] it's fine. You just run your queries and [00:12:56] that's it. [00:12:57] Awesome. So let me jump back into my [00:13:01] slides and talk a little bit about other [00:13:04] features. So we simplified some case [00:13:06] statements. [00:13:08] We are not loading this the SQL vector [00:13:10] properties by default now. They are left [00:13:13] on a database because rarely you need [00:13:15] the SQL vector to be fetched onto the [00:13:17] client side. It's purely for the vector [00:13:20] search or similarity search on the on [00:13:23] the server side [00:13:24] and we improved some access for tuples [00:13:28] and value tuples [00:13:29] for or through constructor bound [00:13:32] projections. [00:13:33] And a lot more you can read about it in [00:13:37] in the document I will link at the end. [00:13:40] On the modeling side, we also introduced [00:13:42] some new features that were previously [00:13:44] not supported, not available and so on. [00:13:46] So first and foremost, complex type and [00:13:49] complex types and JSON columns are now [00:13:51] supported for TPC and TPT inheritance [00:13:54] hierarchies. If you are using temporal [00:13:56] tables, you can use these temporal [00:13:58] properties [00:14:00] and map them into the CLR. They don't [00:14:02] need to be scheduled anymore. [00:14:05] You can now introduce indexes on complex [00:14:07] properties. Really nice feature that I'm [00:14:09] actually excited about and we can also [00:14:11] define that some [00:14:14] some binding some some foreign key [00:14:16] between entities is not constrained. So [00:14:19] it's there, but it's not constrained on [00:14:20] the database side. Just in case you [00:14:22] cannot have it on the database side [00:14:24] because, for example, you're importing [00:14:25] the data from some system or something [00:14:28] like that. [00:14:29] So let me again jump into my demos. I [00:14:33] have two in here for the modeling. The [00:14:35] first one is for the complex types. [00:14:38] So let me jump into what is actually [00:14:40] interesting. So what I have in here is a [00:14:44] bunch of complex properties [00:14:47] in my in my model. My model is [00:14:50] customer. Customer has an address and [00:14:52] contact which are the [00:14:55] complex properties in my case and a [00:14:58] vehicle where I have two derived [00:15:00] classes, car and a van. [00:15:03] And each of those has a registration. [00:15:06] Simple as that. [00:15:08] So in my case I'm saying, hey, use the [00:15:10] TPT mapping strategy. And what I can now [00:15:14] define is an index. [00:15:16] So first of all, I can index into a [00:15:18] complex property that will be a bunch of [00:15:20] columns, but I can define it on the EF [00:15:22] Core side. You could do that before like [00:15:24] manually, but now you can do it in the [00:15:27] in the EF Core itself and EF Core will [00:15:29] understand how it's mapped and so on. [00:15:32] But also I can have a JSON index because [00:15:35] my complex property for registration, [00:15:37] which is right here, is mapped into a [00:15:39] JSON, not into a bunch of columns. [00:15:42] So it's slightly different and I can [00:15:44] specify has index Oops, Visual Studio is [00:15:47] acting with me. [00:15:49] Has index and kind of dot into my [00:15:52] complex property, in this case [00:15:54] registration and plate. [00:15:56] So now if I run this code, we will see [00:16:00] the structure. Yeah, let me make it [00:16:02] slightly bigger. So this is my address [00:16:05] and contact, the normal kind of complex [00:16:08] property that's into a different [00:16:09] columns, but the registration is a [00:16:12] complex property mapped into a JSON. [00:16:16] Then on my index side, I have this [00:16:18] index, which is using uh the normal [00:16:21] columns. [00:16:22] And then finally, the JSON index very [00:16:25] correctly [00:16:27] uh index whatever you specified. So you [00:16:30] don't have to worry about the syntax and [00:16:31] stuff like that. So in my case, it's the [00:16:33] plate property inside the JSON. Then if [00:16:37] you are querying the data, obviously you [00:16:39] will be querying it as usual. Uh now we [00:16:43] are using the JSON value and matching it [00:16:45] with the plate. And hopefully if the [00:16:48] optimizer on the database side decides, [00:16:50] hey, I need to I have an index, I can [00:16:53] use it, it will use it that you cannot [00:16:55] kind of force it. But in this case, it [00:16:57] would use it because it's like perfect [00:16:59] match for that index. [00:17:02] The other part is the unconstrained uh [00:17:06] constraint [00:17:08] if I can say. [00:17:09] Um [00:17:10] so what I have in here is let's say you [00:17:12] have a scenario that you have orders and [00:17:14] customers imported from from some [00:17:16] systems. So you cannot have foreign key [00:17:18] between them because sometimes you have [00:17:19] more orders because you are yet to [00:17:21] synchronize customers. Uh so you cannot [00:17:24] directly map them. [00:17:27] Or you are working for example with the [00:17:29] document database where these are not [00:17:30] enforced, but you still want to know or [00:17:33] at least provide to EF that these are [00:17:36] there. So in my case, I'm just saying, [00:17:37] hey, this constraint false. [00:17:40] Simple as that. [00:17:41] We can even exclude it from migrations [00:17:44] using exclude foreign key from [00:17:45] migrations for example. [00:17:47] And now when I'm querying, it's like [00:17:51] yeah, you know these two are related, [00:17:52] but they are not constrained on the [00:17:53] database side. Uh so [00:17:56] uh we will be doing uh [00:17:59] little bit of magic to give you all the [00:18:01] good left joins, inner joins, or [00:18:02] dropping the joins, and stuff like that. [00:18:04] So if I run it [00:18:06] and put it side by side again, [00:18:09] hopefully it will fit. [00:18:11] So the first one is a little bit [00:18:14] uh more complex. [00:18:16] Join products and the unused will be [00:18:18] pruned. So again, little bit of join [00:18:21] products on product ID and the ID, [00:18:24] simple as that, and I'm projecting the [00:18:25] orders. [00:18:27] So this one [00:18:30] unused part, so it will pruned, similar [00:18:32] feature to what I showed before, [00:18:35] uh but on the next query where I have uh [00:18:38] customers. [00:18:40] Uh so we just need to have the the inner [00:18:42] join [00:18:43] and we need to have a like a stay in [00:18:45] there because yeah [00:18:47] customers and and orders uh need to be [00:18:50] matched together. Uh so we will use the [00:18:52] inner join with customers even though [00:18:55] there's no foreign key, nothing like [00:18:56] that, we can still figure it out because [00:18:58] yeah, it's not there, but logically the [00:19:00] data should be there. [00:19:04] Good. Let me bring up my slides back [00:19:06] again [00:19:06] and talk about the migrations. [00:19:09] So in migrations we improved some like [00:19:11] smaller pieces. We saw one of the [00:19:13] feature exclude foreign key from [00:19:15] migrations [00:19:16] before. For package manager console we [00:19:18] now have a no build switch similar to [00:19:21] what we have for .NET EF in case you [00:19:23] don't want to rebuild your solution. If [00:19:26] you are changing the data type on your [00:19:29] column and it's only changed on the CLR [00:19:31] side, it's the same data type on the [00:19:33] database, we are not doing the alter [00:19:35] column because the alter column was kind [00:19:37] of useless. [00:19:38] Uh and if you are using the migrations [00:19:40] with migration bundles you can use [00:19:42] central package management. Uh the [00:19:45] migrate and ensure created methods are [00:19:47] now using the retry execution strategy, [00:19:49] the normal one that you configure for [00:19:51] example for your safe changes and and [00:19:53] stuff like that. [00:19:55] Moving on to a .NET EF which is kind of [00:19:58] the [00:19:59] piece uh that also executes or can [00:20:01] execute the migrations, we now have a [00:20:03] new support for a specific file in [00:20:05] .config .NET EF JSON and support for [00:20:10] file based apps. So even if you are [00:20:11] using file based apps and using .NET EF [00:20:14] and using EF you're completely covered. [00:20:16] You can use that and you can use [00:20:18] generate migrations, apply them and so [00:20:20] on. [00:20:21] But what I want to talk is the .NET EF [00:20:25] uh .NET EF file we have in here. So let [00:20:29] me open [00:20:31] a PowerShell in here [00:20:36] and do [00:20:38] .NET EF migrations. I already tried it [00:20:41] so we can do this. So I want to try and [00:20:43] add new migration, the initial one. And [00:20:46] if I do .NET EF migrations add and run [00:20:48] it, it will tell me hey no project found [00:20:51] uh in the current directory. Makes sense [00:20:53] because first of all I have it in my [00:20:55] source directory and I have data and web [00:20:59] projects kind of like a minimal web [00:21:01] application. Okay, so I can do project [00:21:04] SRC block the data. I can type it in [00:21:06] there. It's kind of [00:21:08] boring if in case you need to do it [00:21:09] multiple times a day or or or more more [00:21:12] people in your team need to type it [00:21:14] every time but okay I can do project [00:21:17] kind of makes sense. [00:21:18] I will try to build it [00:21:20] and create the migration but it will [00:21:22] fail again because it will tell me hey [00:21:24] block data does not have the entity [00:21:27] framework core design reference. [00:21:30] Makes sense because my startup project [00:21:33] is actually different. My startup [00:21:34] project is the web project not the data. [00:21:37] So I have it in a different project. If [00:21:38] you have connection string connection [00:21:40] strings and stuff like that you need to [00:21:42] also specify startup um [00:21:47] startup project. [00:21:49] I made a bunch of typos does not really [00:21:51] matter and you need to specify it. Now [00:21:52] the command line is getting kind of long [00:21:54] and boring and you need to type it every [00:21:56] time. [00:21:57] So what you can do now is go into dot [00:22:00] config, create a .NET EF JSON file. I [00:22:04] have it renamed so it's not being picked [00:22:06] up. [00:22:07] Yes, I want to [00:22:09] uh [00:22:10] change. [00:22:11] If we check what's actually in [00:22:15] this file you'll see that I have a [00:22:17] project and my startup project but [00:22:19] that's exactly what I needed. [00:22:21] And now if I do it [00:22:24] like I did it in the first place without [00:22:26] any switches, it will be able to figure [00:22:29] out [00:22:30] what needs to happen, where is the [00:22:32] project, and stuff like that. So now [00:22:34] it's building, build succeeded, [00:22:37] creating the migration and says done, [00:22:39] undo the action migration remove. And if [00:22:41] you check just to be sure in the data, [00:22:44] you will see there is a migrations [00:22:45] folder and there is my initial migration [00:22:49] available in there. [00:22:51] Also, so that quickly simplifies this uh [00:22:54] for uh teams and stuff like that where [00:22:57] you can predefine all those switches uh [00:23:00] and command line arguments and you have [00:23:02] to type it every time. So even if you [00:23:04] are fine, maybe you have a batch script [00:23:06] or uh maybe it's uh in your history of [00:23:08] your of your terminal, uh other team [00:23:10] members might not have it. They need to [00:23:12] type it at least initially one time, [00:23:14] then it's in in the history. Now you [00:23:16] have it there, it's shorter, you don't [00:23:18] have to worry about and you just do .NET [00:23:20] EF migrations or .NET EF, whatever you [00:23:22] want. It just matches any command from [00:23:25] .NET EF. [00:23:27] Now let's talk about specifically SQL [00:23:30] Server, Cosmos DB, SQLite and so on. [00:23:32] What are the changes in there? What you [00:23:34] can expect? [00:23:35] So in SQL Server, the new compatibility [00:23:38] level is now 160, which means SQL Server [00:23:41] 2022. If you are using SQL Server that's [00:23:43] before 2022, you need to or you should [00:23:46] change this to a compatibility level [00:23:48] that actually matches your database. [00:23:51] And if you are using SQL Server 2025, [00:23:53] for example, then definitely set it to [00:23:55] 170 uh so you can use all the new [00:23:58] features in 2025 [00:24:00] and we will even give you a nicer [00:24:02] translations where we can. [00:24:04] Also our SQL Server package now [00:24:07] references Microsoft Data SQL Client [00:24:10] version 7. [00:24:12] Uh so there are some changes as well, so [00:24:14] definitely uh check that out. And the [00:24:17] SQL Server can now do more translations. [00:24:19] A lot of those translations were uh [00:24:21] contributed by community. Uh so yeah, [00:24:24] definitely thank you about it and we are [00:24:26] happy to take any number of [00:24:28] contributions, small ones, improvements, [00:24:30] like for example, translating in parse. [00:24:32] If you have in your query int . parse, [00:24:35] before it was not translated, it's kind [00:24:37] of easy to do it in the sequel, you just [00:24:38] cast it to an integer from varchar and [00:24:41] stuff like that. Now it is supported and [00:24:44] uh it's a again a little bit easier to [00:24:46] do this directly in the query without [00:24:48] any workarounds. [00:24:50] On the Cosmos DB, we have support for a [00:24:52] bunch of interesting features. First of [00:24:55] all, transactional batches, bulk [00:24:57] execution, and a new session token [00:25:00] management. [00:25:01] On the like inner side, we uh rewrote [00:25:04] the materialization using the UTF-8 JSON [00:25:08] reader that allowed us to switch from a [00:25:10] Newton soft JSON into a system text [00:25:13] JSON. And finally, also the underscore [00:25:16] underscore J object backing property is [00:25:19] now gone. So if you are using it because [00:25:21] it was kind of there, uh it's no longer [00:25:23] there, you need to change your code. If [00:25:25] you were offended by it, uh you don't [00:25:27] have to be anymore. It's gone and um [00:25:31] and you don't have to deal with it. [00:25:34] All right, let me jump into my Cosmos [00:25:36] demos. [00:25:38] And [00:25:41] what I have in here is a demo for the [00:25:43] transactional transactional batches. [00:25:46] And I would say this is like [00:25:49] uh university databases course [00:25:51] one-on-one. What I have in here is a [00:25:53] transfer between two accounts. [00:25:56] Uh from the checking account, I will [00:25:58] remove 100 dollars or monetary units, [00:26:01] and on the savings account, I will add [00:26:03] you transferred something between [00:26:04] between your two accounts. Obviously, [00:26:06] you want this to be transactionally [00:26:08] consistent. To make matters worse, I [00:26:10] have also a small job in here that is [00:26:13] running, let's say every hour, every [00:26:14] night, and this will run some interest [00:26:18] computations. In my case, on my savings [00:26:21] account, it will give me one monetary [00:26:23] unit because I was saving, so I will get [00:26:26] some extra. [00:26:28] But if these two are running at the same [00:26:30] we can have a nasty collision. [00:26:34] This is running on Cosmos DB [00:26:36] and uh [00:26:39] what I have is [00:26:41] a couple of different demos. First of [00:26:43] all, I will run it with the [00:26:45] transactional behavior never, [00:26:47] which is exactly what the EF 10 executed [00:26:50] it before. [00:26:52] Then I will do when needed. Basically, [00:26:54] it will be one transaction [00:26:57] per partition. Like when it's needed, I [00:27:00] will or EF will use it. [00:27:03] And then I will do something that is not [00:27:04] supported on the Cosmos DB side. [00:27:06] Instead of transferring the data between [00:27:08] two of my accounts, I will be [00:27:09] transferring between two [00:27:12] other accounts which are in different [00:27:13] partitions. So I have here transfer [00:27:15] between Alice and Bob. These are in [00:27:17] different partitions. So with when [00:27:19] needed, [00:27:20] it will be like two operations. If I do [00:27:22] always, which is the third option, it [00:27:24] will fail because I cannot do this like [00:27:28] transactionally consistent way because [00:27:30] it's between different partitions. [00:27:33] So let me run it. [00:27:34] Uh [00:27:38] There it is. So I created the data. My [00:27:41] basic setup is I have $1,000 in [00:27:44] checking's account and nothing in [00:27:46] saving. [00:27:47] If I change 100 if I transfer $100 into [00:27:50] the savings account and get $1 from the [00:27:53] interest, I should have 900 and 101 on [00:27:56] the other account. [00:27:57] If I run it in a default one, [00:27:59] it's going to fail. I have a 900 in [00:28:01] checking [00:28:02] that kind of is okay, but in the [00:28:04] savings, I have only one because the job [00:28:06] that was running the interest kind of [00:28:08] one and the other one was lost because [00:28:11] there was a [00:28:12] E tech mismatch and I lost something. So [00:28:15] I would have to do it again, restart, [00:28:17] whatever. I have some kind of [00:28:19] reconciliation in case I can [00:28:21] detect it or something like that. [00:28:24] With the new mode, we will see that we [00:28:26] have still the [00:28:28] mismatch, but at least I detected the [00:28:30] the conflict. [00:28:32] The change was rolled back. Before it [00:28:34] was not rolled back. It stayed in this [00:28:36] in this case. So now I have consistent [00:28:39] case. It's not [00:28:40] correct, but at least it's consistent. I [00:28:42] have 1001. It's fine. The transfer [00:28:45] between checking and savings account uh [00:28:47] did not happen, but I detected it [00:28:49] because there was a collision. So I can [00:28:51] try it again and you can see we are [00:28:52] using the transactional batch. [00:28:55] And now I have 900 and 101 which [00:28:58] together is correct and it's also [00:29:01] correct in terms of having these [00:29:02] accounts in a good shape. [00:29:05] Finally, if I transfer something between [00:29:07] Alice and uh Bob, we you can see we are [00:29:10] now using the replace item as usual. We [00:29:13] cannot do it in one transactional batch [00:29:15] because the partition is one time Alice [00:29:17] and and second time Bob. [00:29:19] Uh so the first time when I used um the [00:29:23] when needed, it just happened. It just [00:29:25] used two two different operations. But [00:29:28] if I say always, which was my last [00:29:30] requirement [00:29:32] uh in here, I will get an exception say, [00:29:35] hey, we cannot do it because it's in a [00:29:36] different partitions and stuff like [00:29:38] that. So you have to either redesign [00:29:40] your application or do it differently [00:29:41] and something like that. [00:29:44] So that's the uh cosmos part. [00:29:47] For the SQLite, which is another uh part [00:29:50] that we are providing including the [00:29:51] provider. So for the low-level provider, [00:29:54] we added support for half type that's uh [00:29:58] available in .NET for quite some time. [00:30:01] And one important change that is [00:30:02] definitely worth knowing about in [00:30:04] advance, we removed the support for .NET [00:30:07] Standard 2.0. So the new version of the [00:30:09] provider uh version 11 is not using the [00:30:13] .NET Standard 2.0. It's only using .NET [00:30:15] 10 and higher. That does not mean you [00:30:17] cannot use the the previous versions. [00:30:19] You can still use the previous versions [00:30:20] if you are on older versions of .NET or [00:30:23] you need .NET Standard. They will [00:30:24] receive security fixes and stuff like [00:30:27] that. They will just not receive new [00:30:28] features. New features go only into 11 [00:30:31] and so on or 12. [00:30:33] And [00:30:34] uh uh case you want to use that one, you [00:31:46] need to be at least on .NET 10 or [00:31:48] higher. [00:31:50] So, uh small [00:31:53] features around uh with the release. [00:31:56] Enjoy it, play with it, and see you [00:32:00] maybe next time. [00:32:01] Thank you.