Search for existing suggestions

Detect only properties that actually changed with change tracking POCO proxies

I've noticed that in the proxied poco classes, an entity is marked as modified whenever a property is set, regardless of whether the value has actually changed. I think it would be nicer if only truly modified entities are flagged as modified.

214 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Mike Flasko shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    4 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • Jon commented  ·   ·  Flag as inappropriate

        Personally, I don't like the solution of having to use INotifyPropertyChanged. That means that you can't use auto properties for succinctness, thus massively increasing the size of your entity classes if you have a lot of properties. If you don't use that, then, it's using snapshot, which of course uses lots of memory and is slow. Previously, I found that code first was slower than EF 5. So, now you get to put tons more boiler plate code in your classes or, things are slower. I've given up on the idea of having EF work with anything except a very small number of objects. The sad thing is that I've had better success with other ORMs like Hibernate in this regard.

      • Anonymous commented  ·   ·  Flag as inappropriate

        In EF6 if you set the same property value again and again, the entity won't be marked as dirty!

        I'd like to be able to all properties that change. GetModifiedProperties() returns all the properties modified or not - can be achieved by code.

      • Anonymous commented  ·   ·  Flag as inappropriate

        I'd like to be able to all properties that change. GetModifiedProperties() returns all the properties modified or not.

      Feedback and Knowledge Base