Click here to Skip to main content
15,606,617 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
I’m using Entity Framework 4.1 (Code-First) and SQL2008, and I have one question: Is it possible to include SqlDependency (Sytem.Runtime.Caching) to invalidate the cache when one or more tables are changing with EF 4.1??

I’m trying to find any documentation about this, but I just found some articles that is not work properly.
I configured the SQL Server to enable Service Broker and I tried to use SqlCommand to subscription the Query Notification Service. The code runs OK, but when the data chances the cache isn’t destroyed.

Does anyone had to implement of this functionality using Entity Framework 4.1?

Thanks in advanced,
Alessandro Brito.
Updated 11-Nov-11 8:35am
Sander Rossel 12-Nov-11 4:49am    
Interesting question. I've been looking into that too. Unfortunately I haven't found anything yet.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900