public InitializeDatabase ( Database db ) : void | ||
db | Database | |
Résultat | void |
public void InitializeDatabase(T context) { Database db = context.Database; if (!db.Exists() || !db.CompatibleWithModel(false)) { db.Delete(); db.Create(); } DbInitializer dbinitializer = InitializerFactory.GetDbInitializerFor <T>(); dbinitializer.InitializeDatabase(db); Seed(context); }
public void InitializeDatabase(T context) { Database db = context.Database; if (db.Exists()) { db.Delete(); } db.Create(); DbInitializer dbinitializer = InitializerFactory.GetDbInitializerFor <T>(); if (dbinitializer != null) { dbinitializer.InitializeDatabase(db); } Seed(context); }