Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created March 28, 2018 02:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fhernd/99a71d07c71e372a7c63975a248c9f54 to your computer and use it in GitHub Desktop.
Save Fhernd/99a71d07c71e372a7c63975a248c9f54 to your computer and use it in GitHub Desktop.
Creación de un pool de conexiones. OrtizOL.
using System.Data.SqlClient;
namespace R902PoolConexiones
{
class R902Programa
{
static void Main(string[] args)
{
using (SqlConnection conexion = new SqlConnection())
{
conexion.ConnectionString = @"Data source =.\SQLEXPRESS; Initial catalog = Northwind;Integrated Security=SSPI;" +
"Min Pool Size= 5; Max Pool Size = 15; Connection Reset = True; Connection Lifetime = 600";
conexion.Open();
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment