Singleton pattern for data context
问题 I am using singleton pattern in an ASP.net application. I use LINQ to SQL DataContext . I face this problem: when a new record is inserted using the DataContext , it is inserted into the database when the changes are submitted. But when the same data is queried using the DataContext , the data is not retrieved, but it's read when closing and opening the application again. Please let me know how to solve this issue. I user C# 4.0, LINQ, SQL Server 2008. Regards, Jebli 回答1: An instance of