O'Reilly Forums: Ef Doesn't Send Command To Database If A Entity's Property Is Updated To Same Value - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

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

#1 User is offline   gdiaz 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 05-April 14

Posted 05 April 2014 - 02:26 PM

Page 132, second note:

Quote

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

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users