Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • What is Connection Pooling in Enity Framework / Ado.net

    • 0
    • 1
    • 1
    • 1
    • 0
    • 0
    • 0
    • 0
    • 323
    Comment on it

    Hello Friends, In this blog we will try to understand what exactly ADO.NET/ Entity Framework connection pooling is? And we will also go through some important points related to connection pooling. So lets start with few basic:--

    What is connection Pooling ?

    Connection pooling means onces the connection object is opened, after that rather then going and recreating the connection object again and again, the ado.net/EF takes the connection string and puts the connection string in a pooler. In this pooler the connection object will be the cached and later if some buddy open connection again then it will take connection from pool.

    alt text

    Connection establishing process diagram

    Key Points

    1. Connection pooling is enabled by default in ADO.NET/EF. You can turn off connection pooling in connection string if you don't want to use it.
     string ConnectionString = @"Data Source=DataSourceName;Initial Catalog=DatabaseName;Integrated Security=True";
             // pooing by default enable
    

    If you don't want to use pooling then turn off

     string ConnectionString = @"Data Source=DataSourceName;Initial Catalog=DatabaseName;Integrated Security=True; Pooling=False";         
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: