forked from litedb-org/LiteDB
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
69 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using Xunit; | ||
|
||
namespace LiteDB.Tests.Issues; | ||
|
||
public class Issue2534_Tests { | ||
[Fact] | ||
public void Test() { | ||
using LiteDatabase database = new(new ConnectionString() | ||
{ | ||
Filename = "Demo.db", | ||
Connection = ConnectionType.Shared, | ||
}); | ||
ILiteCollection<BsonDocument> accounts = database.GetCollection("Accounts"); | ||
if (accounts.Count() < 3) | ||
{ | ||
accounts.Insert(new BsonDocument()); | ||
accounts.Insert(new BsonDocument()); | ||
accounts.Insert(new BsonDocument()); | ||
} | ||
foreach (BsonDocument document in accounts.FindAll()) | ||
{ | ||
accounts.Update(document); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters