I created my own context which inherits from DbContext. Let's assume I have 1 post in my [Posts] table in the database. Consider this scenario:
- I ask DbContext for this only post for the first time. And DbContext returns it as expected.
- I change one column in [Posts] table manually.
- I refresh my site = I ask DbContext for this post again.
- DbContext returns a post which has old value for this specific column!
I looked into SQL Profiler and the database IS hit every time I refresh my site, so why the returned post has an old value? I guess DbContext is trying to be very clever and has some internal caching mechanism, but it would be nice to inform me that he's so clever...
Can someone explain this to me?