|
|
@ -6,7 +6,7 @@ namespace Infrastructure.Repository.Mongo;
|
|
|
|
|
|
|
|
|
|
|
|
public abstract class MongoRepositoryBase<TEntity, TKey>(IMongoDatabase database) :
|
|
|
|
public abstract class MongoRepositoryBase<TEntity, TKey>(IMongoDatabase database) :
|
|
|
|
IMongoRepositoryBase<TEntity, TKey>
|
|
|
|
IMongoRepositoryBase<TEntity, TKey>
|
|
|
|
where TEntity : class, IIdentifiable, new()
|
|
|
|
where TEntity : class, IIdentifiable<TKey>, new()
|
|
|
|
where TKey : IEquatable<TKey>
|
|
|
|
where TKey : IEquatable<TKey>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
private readonly IMongoCollection<TEntity> _collection = database.GetCollection<TEntity>(typeof(TEntity).Name);
|
|
|
|
private readonly IMongoCollection<TEntity> _collection = database.GetCollection<TEntity>(typeof(TEntity).Name);
|
|
|
|