Example #1
0
 internal ObjectRepositoryTransaction(
     ObjectRepositorySettings <TKey, T> settings,
     LightningTransaction tx,
     LightningDatabase db)
 {
     _settings = settings;
     _tx       = tx;
     _db       = db;
 }
 public ObjectRepository(ObjectRepositorySettings <TKey, T> settings)
 {
     _settings = settings;
     _env      = new LightningEnvironment(settings.Path);
     _env.Open();
     using (var tx = _env.BeginTransaction())
     {
         _db = tx.OpenDatabase();
     }
 }