C
Craig Wagner
I've read in several places on the internet that if you make the same call to
LINQ repeatedly (without refreshing or re-creating the datacontext) it will
always return an object with the same values. I've seen this myself. I
created a WinForm application, issued a LINQ query, used SQL Server
Management Studio to change some values in the table, issued the LINQ query
again, and did not see the changes I'd made through SSMS. Fair enough.
What has me curious is that when I ran Profiler and did the same thing, I
saw SELECT statements being sent to the database for the second and
subsequent calls. So what I don't understand is why LINQ is querying the
database and apparently ignoring what it sends back?
Can anyone explain this seemingly inconsistent behavior or point me to an
article? I've been unsuccessful in finding an answer.
LINQ repeatedly (without refreshing or re-creating the datacontext) it will
always return an object with the same values. I've seen this myself. I
created a WinForm application, issued a LINQ query, used SQL Server
Management Studio to change some values in the table, issued the LINQ query
again, and did not see the changes I'd made through SSMS. Fair enough.
What has me curious is that when I ran Profiler and did the same thing, I
saw SELECT statements being sent to the database for the second and
subsequent calls. So what I don't understand is why LINQ is querying the
database and apparently ignoring what it sends back?
Can anyone explain this seemingly inconsistent behavior or point me to an
article? I've been unsuccessful in finding an answer.