I've been working and playing with EF4 ever since it shipped. I'm really excited by what I see in it. I started digging into the web.config to see what all is involved with it. Unfortunately, when I found the entry in the web.config, I was horrified by what I saw. Here's the line:
<add name="AppEntities" connectionString="metadata=res://*/App_Code.AppModel.csdl|res://*/App_Code.AppModel.ssdl|res://*/App_Code.AppModel.msl;
provider=System.Data.SqlClient;provider connection string="Data Source=.;
Initial Catalog=Example;Integrated Security=True;Pooling=False;
MultipleActiveResultSets=True"" providerName="System.Data.EntityClient"/>
WTH is this? Why in the world would I want to turn off my connection pooling? Seems like a really bad idea to me. It ends up that this, and other options are from the setup. When you choose a connection in Visual Studio 2010, the connection is drawn from the Visual Studio 2010's connection string. Apparently, Visual Studio 2010 turns off connection pooling, I did not know that. Also, you probably don't want to use Integrated Security for your production apps, only for demos. These are a couple of things to look at when you setup your apps.