Home > Net >  Need a singleton processing sqlconnection object, and what are the strengths and weaknesses of the c
Need a singleton processing sqlconnection object, and what are the strengths and weaknesses of the c

Time:04-28

Or is there a better way?

CodePudding user response:

Singleton is just kind of design patterns, is suitable for the object, the need to extend sqlconnection succession or do you need would achieve an interface? Sqlhelper what is static, there is no need to make what singleton

CodePudding user response:

Sqlconnection never singleton,

CodePudding user response:

refer to the second floor is nu month god reply:
sqlconnection never singleton,


Upstairs right

Or you don't want to listen to, but we have to say
Before you also can't distinguish right and wrong, please watch less blog garden, please be a little less for the good, the good, the vs the, because you don't also have no ability to distinguish those articles have to right

Rather than doing nothing all day treat them, and write code, we old driver will be able to tell you things just "honesty drive, drive, in the most normal way less to see racing features, that is not for you, at least you take an examination of sorted first and have a driver's license, don't hit people 2 years, don't cut to swab, in to see how fast"

CodePudding user response:

Hum, Microsoft's own ef don't remind you don't use singleton, didn't you wonder why?

CodePudding user response:

Wrong, is to remind you not to use the singleton

CodePudding user response:

Just don't and it increases with the increasing use of new, remember to close
  • Related