Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6712385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:15:12+00:00 2026-05-26T08:15:12+00:00

I am having an MVC3 + Entity Framework 4.1 app, currently iam testing it

  • 0

I am having an MVC3 + Entity Framework 4.1 app, currently iam testing it locally on my pc.

I want to know whether i have closed all my connections properly by disposing entities context or not. Also is there any available method thru which i can see how many connections are currently open. I am afraid i am not closing all my open connections properly.

Or is there any other way to check whether through my web app i am closing all my db connections properly or not

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:15:13+00:00Added an answer on May 26, 2026 at 8:15 am

    With ADO.NET normally you do not open/close physical database connections manually. There is a connection pool handled by the framework. So when you do new SqlConnection you are not opening a new physical connection to the database, you are simply drawing one from the pool. And when you call connection.Close you are not closing the connection, you are simply returning it to the connection pool so that it can be reused.

    So what is important for you is to ensure that your code holds connections for as short time as possible and return them to the pool as fast as possible. You may take a look at the following article which goes into more details about connection pooling.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently developing an app using ASP.NET MVC3 and Entity Framework 4.1 Code First
Having a reallllll mind pain. I have a php image uploader which is all
I have a C# MVC3 project and am having trouble implementing the HTML.CheckBoxFor. I
I am having trouble changing the connection string used by entity framework code first
I am having this kind of mysterious issue here. I am currently using Entity
While developing my app (asp.net mvc3) locally everything was fine using the VS dev
I want to use MVC 3 and the Entity Framework for my application. The
I am trying to use MVC3 with the Entity framework with Code First, but
Have an ASP.NET MVC3 app with model validation using FluentValidation . User enters some
I am having trouble using the StringLengthAttribute when validating my model using Entity Framework

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.