Is using a singleton for the connection a good idea in ASP.NET website
问题 I'm currently using a singleton on my web application so that there is always only one connection to the database. I want to know if it's a good idea because right now I'm having trouble with that error: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Another important point is that my website is currently in dev and not a lot of people go on it so I don