Delete rows direct in the database but it still display in my asp.net mvc website
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.
精彩评论