Open
Description
openedon Aug 17, 2022
ctx.blogs.ExecuteUpdate(s => s.SetProperty(b => b.SomeJsonDocument.Foo, b => "foo");
Things get interesting when there are multiple updates inside the same JSON document:
ctx.blogs.ExecuteUpdate(s => s
.SetProperty(b => b.SomeJsonDocument.Foo, b => "foo")
.SetProperty(b => b.SomeJsonDocument.Bar, b => "bar");
We could apply the same logic we're discussing for SaveChanges:
- Do "least-common-denominator" to find the smallest branch containing all the properties to be updated.
- As a further optimization, nest multiple invocations (e.g. of JSON_MODIFY for SQL Server) to update the two properties; but we need to investigate and benchmark to know to what extent that makes sense and when.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment