开发者

How to apply Sql Dependency in ASP.NET MVC?

开发者 https://www.devze.com 2022-12-18 19:22 出处:网络
H开发者_StackOverflow社区ow can we apply Sql Dependency in Asp.Net MVC for cached objects?MSDN says:

H开发者_StackOverflow社区ow can we apply Sql Dependency in Asp.Net MVC for cached objects?


MSDN says:

To set up a dependency, you need to associate a SqlDependency object to one or more SqlCommand objects. To receive notifications, you need to subscribe to the OnChange event.

If you are using an ORM for your data model, I'm not sure how this applies.

More info here:

http://msdn.microsoft.com/en-us/library/t9x04ed2.aspx


Also you can use SqlDependency with Entity Framework 5.you use following link: http://www.codeproject.com/Articles/496484/SqlDependency-with-Entity-Framework-5-0

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号