开发者

Why is one of my Entities all of a sudden using Snapshot instead of Change Tracking?

开发者 https://www.devze.com 2023-02-25 14:59 出处:网络
I have an Entity Framework 4 project with many POCO Entities (50+) that are automatically generated from the edmx file using a template. They all default to use Proxies and Change Tracking. Everything

I have an Entity Framework 4 project with many POCO Entities (50+) that are automatically generated from the edmx file using a template. They all default to use Proxies and Change Tracking. Everything has been working great, until I noticed that one of my Entities all of a sudden is not using Change Tracking. When I look at the Entity Wrapper of the ObjectStateEntry in debug mode for this entity only, it shows that it is an EntityWrapperWithoutRelationship, and that the ChangeTrackingState is set to Snapshot. I have not done anything different to this specific entity, although it is a large entity with many navigation items attached to it. They are all automatically set as ICollection properties, and they all are virtual properties. This entity does not have any complex properties. It does have a computed field, but I don't think that has anything to do with it. Like I said, this entity was working fine like the other entities, but I cannot figure out why it no longer is. And I have made too many changes to the entire applic开发者_开发知识库ation and edmx file to know what it could be. I could really use some insight into what could be causing this.

0

精彩评论

暂无评论...
验证码 换一张
取 消