Sqlcachedependency not invalidating
PUPTEXT Select i Dim SCD As New Sql Cache Dependency(DB. Insert("puptext", pt, SCD) End If Return Cache("puptext") End Function Firstly, is this how you'd usually cache a linq result? Public Shared Function Get Pup Text() As IQueryable(Of PUPTEXT) If Cache("puptext") Is Nothing Then Dim DB As New DBData Context Dim pt = From i In DB.A community member, Jim, once wrote an article for the topic: 11He listed some important points (e.g.SQL server 2005 version issues) that we should pay special attention to when associating LINQ with Sql Cache Dependency.| | And the KB article describes the | Step-By-Step approach in implementing Query Notifications, though it does | not mention LINQ.| | Let me know if you have any other concerns or questions.
In a trace I can see the sqldependency starts correctly.
Start("connect ionstring as the sa user") and against the db, I did ALTER DATABASE mydb SET ENABLE_BROKER I have the following routine to return a cache version of a table called puptext..
-- Adrian Hello Adrian, Yes, they are the recommended steps to use SQLCache Dependancy with LINQ.
Regards, Jialiang Ge (email@example.com, remove 'online.') Microsoft Online Community Support Delighting our customers is our #1 priority.
We welcome your comments and suggestions about how we can improve the support we provide to you.