开发者

Delete rows direct in the database but it still display in my asp.net mvc website

开发者 https://www.devze.com 2023-01-18 11:12 出处:网络
I\'m developing a website using asp.net mvc 2.0 . I\'m using LINQ to SQL for my Mod开发者_如何学编程el. But I have a problem. When I delete rows direct in the database (by using SQL Server Enterprise

I'm developing a website using asp.net mvc 2.0 . I'm using LINQ to SQL for my Mod开发者_如何学编程el. But I have a problem. When I delete rows direct in the database (by using SQL Server Enterprise Manager, or run query in SQL Query Analyzer), my website still display that rows. It seem LINQ to SQL have automatic cached what it fetched before.

How can I fix this problem?


Yeah I finally found the solution. It's not LINQ to SQL cache. It's the cache from Ninject. Just change InSingletonScope() to InRequestScope() and the problem is over.

0

精彩评论

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