Hi,
I am using the below code to fetch data. If I execute the same method more than 10 times then it rejects connection
There is no max connections in the database means the Unlimited connections are allowed at the db.
Is there a way to handle connection pooling because as per my knowledge Object context automatically opens and closes the connection so I dont understand why I am getting this connection problem after 10 number of connection request.
ANY Help will be appreciated. Thanks in adv.
using (WSFBIZTALKEntities objBizTalkServer = new WSFBIZTALKEntities())
{
try
{
var queryBTSServerName = from bizTalkServer in objBizTalkServer.WAM_BTS_Server
where bizTalkServer.Id == 1
select bizTalkServer.Name;
return queryBTSServerName.FirstOrDefault();
}
catch (Exception ex)
{
throw ex;
}
}
Happy Coding