© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
4 replies
Alizer

Does DbSet.FirstOrDefaultAsync return a tracked entity?

I have the following code below
var existingCreator = await _dbContext.ContentCreators.FirstOrDefaultAsync(x => x.Name == creator.Name);
var existingCreator = await _dbContext.ContentCreators.FirstOrDefaultAsync(x => x.Name == creator.Name);


is changing properties inside
existingCreator
existingCreator
going to also change the record inside the sql server?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

✅ EF: Instance of Entity Type cannot be tracked (already being tracked)
C#CC# / help
8mo ago
❔ accessing collections via principal entity vs directly on dbset
C#CC# / help
3y ago
❔ DBSet manipulation
C#CC# / help
3y ago
The instance of entity type 'OptimizerInstanceEntity' cannot be tracked
C#CC# / help
2y ago