http://www.progware.org/Blog/post/Slow-Performance-Is-it-the-Entity-Framework-or-you.aspx
using (LocationsContext ctx = new LocationsContext())
{
var Locations = ctx.Locations.ToList();
}
using (LocationsContext ctx = new LocationsContext())
{
ctx.Configuration.ProxyCreationEnabled = false;
var Locations = ctx.Locations.ToList();
}
using (LocationsContext ctx = new LocationsContext())
{
ctx.Configuration.ProxyCreationEnabled = false;
var Locations = ctx.Locations.select(x=>new{...}).ToList();
}
using (LocationsContext ctx = new LocationsContext())
{
ctx.Configuration.ProxyCreationEnabled = false;
var Locations = ctx.spDemo().ToList();
}