Changeset 4649 for branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/Tools/CreateHiveDatabaseApplication.cs
- Timestamp:
- 10/28/10 14:52:56 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/Tools/CreateHiveDatabaseApplication.cs
r4629 r4649 27 27 28 28 public override void Run() { 29 CreateDataContext<HiveDataContext> contextCreator = new CreateDataContext<HiveDataContext>(ContextFactory<HiveDataContext>.CreateHiveContext); 30 IContextFactory<HiveDataContext> contextFactory = new ContextFactory<HiveDataContext>(contextCreator); 31 32 using (contextFactory.GetContext(false)) { 33 if (contextFactory.CurrentContext.DatabaseExists()) 34 contextFactory.CurrentContext.DeleteDatabase(); 35 contextFactory.CurrentContext.CreateDatabase(); 29 var dao = new HiveDao(); 30 using (var db = dao.CreateContext()) { 31 if (db.DatabaseExists()) 32 db.DeleteDatabase(); 33 db.CreateDatabase(); 36 34 } 37 35 }
Note: See TracChangeset
for help on using the changeset viewer.