Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detached entities appear in ChangeTracker.Entries() #8921

Closed
Wain123 opened this issue Jun 21, 2017 · 1 comment
Closed

Detached entities appear in ChangeTracker.Entries() #8921

Wain123 opened this issue Jun 21, 2017 · 1 comment
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@Wain123
Copy link

Wain123 commented Jun 21, 2017

var u = ctx.Posts.First();
ctx.Entry(u).State = EntityState.Detached;
Console.WriteLine(ctx.ChangeTracker.Entries().Count());
ctx.Entry(u);
Console.WriteLine(ctx.ChangeTracker.Entries().Count());

This code outputs "0 1". Simply looking at u's entry after detaching u causes the entry to appear in the ChangeTracker, even though u is detached. Is this working as intended?

@ajcvickers
Copy link
Member

Note for triage: confirmed repro on 1.1.2.

@ajcvickers ajcvickers self-assigned this Jun 21, 2017
@ajcvickers ajcvickers added this to the 2.0.0 milestone Jun 21, 2017
@ajcvickers ajcvickers added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jun 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

No branches or pull requests

2 participants