More strings to MongoIds

Convert constructors into primary constructors

Simplified logic with use of ??, ??= and method groups

Cleaned up redundant conditional access qualifiers
This commit is contained in:
Chomp
2025-07-14 22:29:41 +01:00
parent 26afa19387
commit 040be2feaa
150 changed files with 482 additions and 631 deletions
@@ -25,9 +25,9 @@ public class InMemoryCacheService(ICloner cloner)
/// <returns> Stored data </returns>
public T? GetDataByKey<T>(string key)
{
if (_cacheData.ContainsKey(key))
if (_cacheData.TryGetValue(key, out var value))
{
return (T)_cacheData[key];
return (T)value;
}
return default;