Maurycy Markowski

Results 155 comments of Maurycy Markowski

example of a dupe: https://github.com/dotnet/efcore/issues/31279 `.FirstOrDefaultAsync(j => j.Id == request.Id, cancellationToken)` is effectively `.Where(j => j.Id == request.Id).FirstOrDefaultAsync(cancellationToken)` so now your custom DTO ctors are not in final projection (which...

This is by design. We don't deduplicate results using change tracker, you need to do that yourself explicitly by adding Distinct into the query. All change tracker does is recognize...

issues to investigate: Json_branch_collection_distinct_and_other_collection - NRE Json_collection_distinct_in_projection - NRE Json_collection_filter_in_projection - NRE Json_collection_SelectMany - unable to track Json_collection_skip_take_in_projection - NRE Json_multiple_collection_projections - NRE Json_nested_collection_anonymous_projection_in_projection - invalid token Json_nested_collection_filter_in_projection - NRE...

Json_branch_collection_distinct_and_other_collection ``` ss.Set() .OrderBy(x => x.Id) .Select(x => new { First = x.OwnedReferenceRoot.OwnedCollectionBranch.Distinct().ToList(), Second = x.EntityCollection.ToList() }) ``` Reason for NRE exceptions is that in InjectEntityMaterializers (specifically in ProcessEntityShaper) we...

Example test case: ```cs [ConditionalFact] public void Test_NTWIR_owned_type() { using (var ctx = new MyContext()) { ctx.Database.EnsureDeleted(); ctx.Database.EnsureCreated(); var e = new MyEntity { Owned = new OwnedRoot { Number...

covered by https://github.com/dotnet/efcore/pull/33101, closing

If you want to use EF start to finish, you can make the new properties optional at first, then load all the entities, add values for those new properties, save...

in EF9 AOT will be experimental, some functionality will not work - this is one of the issues we will try to fix for 10

The fact that second argument to the Union is IEnumerable is not a problem. The entire expression will be translated to SQL and second argument will not be evaluated and...