db: refactor to only init mongo client & collections once

This commit is contained in:
Abdullah Atta
2024-06-07 15:39:12 +05:00
parent c5b41be2fd
commit 99f095babe
4 changed files with 23 additions and 57 deletions
@@ -29,6 +29,5 @@ namespace Streetwriters.Data.Interfaces
{
void AddCommand(Func<IClientSessionHandle, CancellationToken, Task> func);
Task<int> SaveChanges();
IMongoCollection<T> GetCollection<T>(string databaseName, string collectionName);
}
}