Multiple tables in ountputcache sqldependency mvc attribute

I am using sqlependency outputcache and it works absolutely fine, but now I want to depend on multiple tables.

[OutputCache(Duration = 600, SqlDependency = "db:table1")]

      

My question is, does sqldependency support multiple tables? if so what is the syntax?

I tried the following syntax but it didn't work, it thinks it is a table1,table2

name for one table.

[OutputCache(Duration = 600, SqlDependency = "db:table1,table2")]

      

Thanks in advance.

+3


source to share


1 answer


Try:



SqlDependency = "[database]:[table1];[database]:[table2]"

      

+3


source







All Articles