Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/28/10 14:52:56 (14 years ago)
Author:
cneumuel
Message:
  • moved db-context into datalayer
  • businesslayer only defines the transaction-scope
  • removed contextfactory
  • implemented convert-methods
  • made naming in db and domainobjects more consistent
  • changed wcf-service to be http-only (for now)

(#1233)

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  
    2727
    2828    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();
    3634      }
    3735    }
Note: See TracChangeset for help on using the changeset viewer.