Description
Was able to repro the issue on .NetCore unit test. Before running the test case, database cannot be existed.
public void TestChangeEncryptionKeyNSaveDocOnNewDB() |
{
|
var config = new DatabaseConfiguration { |
Directory = Directory
|
}; using (var db1 = new Database("master3", config)) { |
db1.ChangeEncryptionKey(new EncryptionKey("password")); // setting encryption key on the database file, the database file didn't exist yet in this case |
using (MutableDocument saveDoc = db1.GetDocument("my-doc")?.ToMutable() ?? new MutableDocument("my-doc")) { |
saveDoc.SetString("prop", "value"); |
db1.Save(saveDoc);
|
}
|
}
|
}
|