public IDDB Get(string orgSlug, Guid internalRef) { var baseDdbPath = GetDdbPath(orgSlug, internalRef); Directory.CreateDirectory(baseDdbPath); var ddb = new DDB(baseDdbPath); // TODO: It would be nice if we could use the bindings to check this if (!Directory.Exists(Path.Combine(baseDdbPath, DDB.DatabaseFolderName))) { ddb.Init(); _logger.LogInformation("Initialized new ddb in '{DaseDdbPath}'", baseDdbPath); } else { _logger.LogInformation("Opened ddb in '{BaseDdbPath}'", baseDdbPath); } return(ddb); }