LinqToSql static DataContext in a web application

后端 未结 5 1152
囚心锁ツ
囚心锁ツ 2021-01-02 12:14

In a web application that I have run across, I found the following code to deal with the DataContext when dealing with LinqToSQL

public partial class DbDataC         


        
5条回答
  •  不知归路
    2021-01-02 12:36

    A DataContext is cheap to make and you won't gain much by caching it in this way.

提交回复
热议问题