EF Core doesn't track the keyless entity instances contained in the result.
But EF Core tracks all the other instances of entity types with a key
according to rules above.

##  Previous versions

Before version 3.0, EF Core had some differences in how tracking was done.
Notable differences are as follows:

  * As explained in the [ Client vs Server Evaluation ](client-eval) page, EF Core supported client evaluation in any part of the query before version 3.0. Client evaluation caused materialization of entities, which weren't part of the result. So EF Core analyzed the result to detect what to track. This design had certain differences as follows: 

    * Client evaluation in the projection, which caused materialization but didn't return the materialized entity instance wasn't tracked. The following example didn't track ` blog ` entities. 
        
                var blogs = context.Blogs
            .OrderByDescending(blog => blog.Rating)
            .Select(
                blog => new { Id = blog.BlogId, Url = StandardizeUrl(blog) })
            .ToList();
        

    * EF Core didn't track the objects coming out of LINQ composition in certain cases. The following example didn't track ` Post ` . 
        
                var blog = context.Blogs
            .Select(
                b =>
                    new { Blog = b, Post = b.Posts.OrderBy(p => p.Rating).LastOrDefault() });
        

  * Whenever query results contained keyless entity types, the whole query was made non-tracking. That means that entity types with keys, which are in the result weren't being tracked either. 

  * EF Core used to do identity resolution in no-tracking queries. It used weak references to keep track of entities that had already been returned. So if a result set contained the same entity multiples times, you would get the same instance for each occurrence. Though if a previous result with the same identity went out of scope and got garbage collected, EF Core returned a new instance. 

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create
and review issues and pull requests. For more information, see [ our
contributor guide
](https://learn.microsoft.com/contribute/content/dotnet/dotnet-contribute) .

![](https://learn.microsoft.com/media/logos/logo_net.svg)
![](https://learn.microsoft.com/media/logos/logo_net.svg)

.NET

[ Open a documentation issue  ]() [ Provide product feedback
](https://github.com/dotnet/efcore/issues/new/choose)

##  Feedback

Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the
feedback mechanism for content and replacing it with a new feedback system.
For more information see: [ https://aka.ms/ContentUserFeedback
](https://aka.ms/ContentUserFeedback) .

Submit and view feedback for

[ This product  ](https://github.com/dotnet/efcore/issues/new/choose) This
page

[ View all page feedback
](https://github.com/dotnet/EntityFramework.Docs/issues)

* * *

##  Additional resources

[ California Consumer Privacy Act (CCPA) Opt-Out Icon  Your Privacy Choices
](https://aka.ms/yourcaliforniaprivacychoices)

Theme

  * Light 
  * Dark 
  * High contrast 

  *   * [ Previous Versions ](/en-us/previous-versions/)
  * [ Blog ](https://techcommunity.microsoft.com/t5/microsoft-learn-blog/bg-p/MicrosoftLearnBlog)
  * [ Contribute ](/en-us/contribute/)
  * [ Privacy ](https://go.microsoft.com/fwlink/?LinkId=521839)
  * [ Terms of Use ](/en-us/legal/termsofuse)
  * [ Trademarks ](https://www.microsoft.com/legal/intellectualproperty/Trademarks/)
  * © Microsoft 2024 

##  Additional resources

###  In this article

[ California Consumer Privacy Act (CCPA) Opt-Out Icon  Your Privacy Choices
](https://aka.ms/yourcaliforniaprivacychoices)

Theme

  * Light 
  * Dark 
  * High contrast 

  *   * [ Previous Versions ](/en-us/previous-versions/)
  * [ Blog ](https://techcommunity.microsoft.com/t5/microsoft-learn-blog/bg-p/MicrosoftLearnBlog)
  * [ Contribute ](/en-us/c