Jump to content


Ef Doesn't Send Command To Database If A Entity's Property Is Updated To Same Value

  • Please log in to reply
No replies to this topic

#1 gdiaz


    New Member

  • Members
  • Pip
  • 1 posts

Posted 05 April 2014 - 02:26 PM

Page 132, second note:

Even if the property was modified using the same value as the original
value, the context will use that value in the update. It’s not comparing
the original and current values, but is depending on the knowledge that
the property was modified, regardless of what the modification was.

But, then I was doing the example 7-3 of page 154 (updating an entity using an store procedure).
I updated the entity successfully and I saw it in the profiler, but the second time I run the example,
the profiler only showed me the select commands and not the update because the original values and the current values were the same. If I change the value of any property then it sends the update command to the database and I see it in the profiler.

I'm using EntityFramework 4.1.10311.0

So, I wonder if the behavior described in the book is for prior versions of EF?

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users