EntityFramework : Calling ToList() on IQueryable with ~11.000 records takes 10 seconds
问题 I want to return a relatively large number of records from SQL Express 2008 R2 server, via EntityFramework 4 through WCF service to a WCF client. My test table contains around 11.000 records at the moment. The LINQ query is as simple as this: Database DB = new Database(); // create object context var retValue = DB.Entities.Persons .Include("District") .Include("District.City") .Include("District.City.State") .Include("Nationality") return retValue.ToList(); This takes about 10 seconds to