diff --git a/Benchmark/Benchmark.csproj b/Benchmark/Benchmark.csproj
index dd763482..c0a6a7cd 100644
--- a/Benchmark/Benchmark.csproj
+++ b/Benchmark/Benchmark.csproj
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/MongoDB.Entities/DB/DB.Watcher.cs b/MongoDB.Entities/DB/DB.Watcher.cs
index eff2d0b2..192e87d7 100644
--- a/MongoDB.Entities/DB/DB.Watcher.cs
+++ b/MongoDB.Entities/DB/DB.Watcher.cs
@@ -5,24 +5,19 @@ namespace MongoDB.Entities;
public static partial class DB
{
///
- /// Retrieves the 'change-stream' watcher instance for a given unique name.
- /// If an instance for the name does not exist, it will return a new instance.
+ /// Retrieves the 'change-stream' watcher instance for a given unique name.
+ /// If an instance for the name does not exist, it will return a new instance.
/// If an instance already exists, that instance will be returned.
///
/// The entity type to get a watcher for
/// A unique name for the watcher of this entity type. Names can be duplicate among different entity types.
public static Watcher Watcher(string name) where T : IEntity
- {
- // Normalize the name once
- var normalizedName = name.ToLower().Trim();
-
- // Use GetOrAdd to ensure thread-safe retrieval or addition of the watcher.
- return Cache.Watchers.GetOrAdd(normalizedName, newName => new Watcher(newName));
- }
+ => Cache.Watchers.GetOrAdd(name.ToLower().Trim(), newName => new(newName));
///
/// Returns all the watchers for a given entity type
///
/// The entity type to get the watcher of
- public static IEnumerable> Watchers() where T : IEntity => Cache.Watchers.Values;
-}
+ public static IEnumerable> Watchers() where T : IEntity
+ => Cache.Watchers.Values;
+}
\ No newline at end of file
diff --git a/MongoDB.Entities/MongoDB.Entities.csproj b/MongoDB.Entities/MongoDB.Entities.csproj
index 840bb38d..92b98524 100644
--- a/MongoDB.Entities/MongoDB.Entities.csproj
+++ b/MongoDB.Entities/MongoDB.Entities.csproj
@@ -2,7 +2,7 @@
- 23.0.1
+ 23.1.0
netstandard2.1
MongoDB.Entities
@@ -31,7 +31,7 @@
-
+
diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj
index 752f635b..9c71a06e 100644
--- a/Tests/Tests.csproj
+++ b/Tests/Tests.csproj
@@ -10,11 +10,11 @@
-
-
-
-
-
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/changelog.md b/changelog.md
index 0a48e2e6..61ec4bcc 100644
--- a/changelog.md
+++ b/changelog.md
@@ -2,6 +2,7 @@
### IMPROVEMENTS
-- upgrade mongodb driver to v2.23
+- upgrade mongodb driver to v2.24
+- minor internal refactors
[//]: # (### BREAKING CHANGES)
\ No newline at end of file