var sw = new Stopwatch();
sw.Start();
Database.SetInitializer(new DropCreateDatabaseIfModelChanges<ImgSimContext>());
using (var db = new ImgSimContext())
{
SqlConnection.ClearAllPools();
db.Database.Initialize(force: true);
sw.Stop();
Console.WriteLine("Booted in {0}ms", sw.ElapsedMilliseconds);
即使已经创建了数据库,这也需要大约2秒钟。有什么办法可以加快速度吗?