rename after full refactor
This commit is contained in:
@@ -11,10 +11,13 @@ namespace MongoDbGenericRepository
|
||||
/// <summary>
|
||||
/// The IBaseMongoRepository exposes the CRUD functionality of the BaseMongoRepository.
|
||||
/// </summary>
|
||||
public interface IBaseMongoRepository : IReadOnlyMongoRepository, IBaseMongoRepository_Create, IBaseMongoRepository_Update, IBaseMongoRepository_Delete, IBaseMongoRepository_Index
|
||||
public interface IBaseMongoRepository :
|
||||
IReadOnlyMongoRepository,
|
||||
IBaseMongoRepository_Create,
|
||||
IBaseMongoRepository_Update,
|
||||
IBaseMongoRepository_Delete,
|
||||
IBaseMongoRepository_Index
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Asynchronously returns a paginated list of the documents matching the filter condition.
|
||||
/// </summary>
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ using MongoDbGenericRepository.Models;
|
||||
|
||||
namespace MongoDbGenericRepository
|
||||
{
|
||||
public interface IKeyTypedReadOnlyMongoRepository<TKey> where TKey : IEquatable<TKey>
|
||||
public interface IReadOnlyMongoRepository<TKey> where TKey : IEquatable<TKey>
|
||||
{
|
||||
#region Read
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace MongoDbGenericRepository
|
||||
/// <summary>
|
||||
/// The IReadOnlyMongoRepository exposes the readonly functionality of the BaseMongoRepository.
|
||||
/// </summary>
|
||||
public interface IReadOnlyMongoRepository : IBaseReadOnlyRepository, IKeyTypedReadOnlyMongoRepository<Guid>
|
||||
public interface IReadOnlyMongoRepository : IBaseReadOnlyRepository, IReadOnlyMongoRepository<Guid>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace MongoDbGenericRepository
|
||||
{
|
||||
public interface IBaseMongoRepository_Create : IKeyTypedBaseMongoDbRepository_Create<Guid>
|
||||
public interface IBaseMongoRepository_Create : IBaseMongoRepository_Create<Guid>
|
||||
{
|
||||
/// <summary>
|
||||
/// Asynchronously adds a document to the collection.
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace MongoDbGenericRepository
|
||||
{
|
||||
public interface IBaseMongoRepository_Delete : IKeyTypedBaseMongoDbRepository_Delete<Guid>
|
||||
public interface IBaseMongoRepository_Delete : IBaseMongoRepository_Delete<Guid>
|
||||
{
|
||||
/// <summary>
|
||||
/// Deletes a document.
|
||||
|
||||
@@ -7,7 +7,7 @@ using MongoDbGenericRepository.Models;
|
||||
|
||||
namespace MongoDbGenericRepository
|
||||
{
|
||||
public interface IBaseMongoRepository_Index : IKeyTypedBaseMongoDbRepository_Index<Guid>
|
||||
public interface IBaseMongoRepository_Index : IBaseMongoRepository_Index<Guid>
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the names of the indexes present on a collection.
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace MongoDbGenericRepository
|
||||
{
|
||||
public interface IBaseMongoRepository_Update : IKeyTypedBaseMongoDbRepository_Update<Guid>
|
||||
public interface IBaseMongoRepository_Update : IBaseMongoRepository_Update<Guid>
|
||||
{
|
||||
/// <summary>
|
||||
/// Asynchronously Updates a document.
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace MongoDbGenericRepository
|
||||
{
|
||||
public interface IKeyTypedBaseMongoDbRepository_Create<TKey> where TKey : IEquatable<TKey>
|
||||
public interface IBaseMongoRepository_Create<TKey> where TKey : IEquatable<TKey>
|
||||
{
|
||||
/// <summary>
|
||||
/// Asynchronously adds a document to the collection.
|
||||
@@ -46,7 +46,7 @@ namespace MongoDbGenericRepository
|
||||
/// Its constructor must be given a connection string and a database name.
|
||||
/// </summary>
|
||||
/// <typeparam name="TKey"></typeparam>
|
||||
public abstract partial class KeyTypedBaseMongoDbRepository<TKey> : IKeyTypedBaseMongoDbRepository_Create<TKey> where TKey : IEquatable<TKey>
|
||||
public abstract partial class BaseMongoRepository<TKey> : IBaseMongoRepository_Create<TKey> where TKey : IEquatable<TKey>
|
||||
{
|
||||
protected MongoDbCreator _mongoDbCreator;
|
||||
protected MongoDbCreator MongoDbCreator
|
||||
+2
-2
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace MongoDbGenericRepository
|
||||
{
|
||||
public interface IKeyTypedBaseMongoDbRepository_Delete<TKey> where TKey : IEquatable<TKey>
|
||||
public interface IBaseMongoRepository_Delete<TKey> where TKey : IEquatable<TKey>
|
||||
{
|
||||
/// <summary>
|
||||
/// Deletes a document.
|
||||
@@ -94,7 +94,7 @@ namespace MongoDbGenericRepository
|
||||
where TDocument : IDocument<TKey>;
|
||||
}
|
||||
|
||||
public abstract partial class KeyTypedBaseMongoDbRepository<TKey>: IKeyTypedBaseMongoDbRepository_Delete<TKey>
|
||||
public abstract partial class BaseMongoRepository<TKey>: IBaseMongoRepository_Delete<TKey>
|
||||
where TKey : IEquatable<TKey>
|
||||
{
|
||||
private MongoDbEraser _mongoDbEraser;
|
||||
+2
-2
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace MongoDbGenericRepository
|
||||
{
|
||||
public interface IKeyTypedBaseMongoDbRepository_Index<TKey> where TKey : IEquatable<TKey>
|
||||
public interface IBaseMongoRepository_Index<TKey> where TKey : IEquatable<TKey>
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the names of the indexes present on a collection.
|
||||
@@ -98,7 +98,7 @@ namespace MongoDbGenericRepository
|
||||
/// Its constructor must be given a connection string and a database name.
|
||||
/// </summary>
|
||||
/// <typeparam name="TKey"></typeparam>
|
||||
public abstract partial class KeyTypedBaseMongoDbRepository<TKey> : IKeyTypedBaseMongoDbRepository_Index<TKey>
|
||||
public abstract partial class BaseMongoRepository<TKey> : IBaseMongoRepository_Index<TKey>
|
||||
where TKey : IEquatable<TKey>
|
||||
{
|
||||
private MongoDbIndexHandler _mongoDbIndexHandler;
|
||||
+12
-12
@@ -4,12 +4,12 @@ using System;
|
||||
|
||||
namespace MongoDbGenericRepository
|
||||
{
|
||||
public interface IKeyTypedBaseMongoDbRepository<TKey> :
|
||||
IKeyTypedReadOnlyMongoRepository<TKey>,
|
||||
IKeyTypedBaseMongoDbRepository_Create<TKey>,
|
||||
IKeyTypedBaseMongoDbRepository_Delete<TKey>,
|
||||
IKeyTypedBaseMongoDbRepository_Index<TKey>,
|
||||
IKeyTypedBaseMongoDbRepository_Update<TKey>
|
||||
public interface IBaseMongoDbRepository<TKey> :
|
||||
IReadOnlyMongoRepository<TKey>,
|
||||
IBaseMongoRepository_Create<TKey>,
|
||||
IBaseMongoRepository_Delete<TKey>,
|
||||
IBaseMongoRepository_Index<TKey>,
|
||||
IBaseMongoRepository_Update<TKey>
|
||||
where TKey : IEquatable<TKey>
|
||||
{
|
||||
}
|
||||
@@ -19,9 +19,9 @@ namespace MongoDbGenericRepository
|
||||
/// Its constructor must be given a connection string and a database name.
|
||||
/// </summary>
|
||||
/// <typeparam name="TKey"></typeparam>
|
||||
public abstract partial class KeyTypedBaseMongoDbRepository<TKey> :
|
||||
KeyTypedReadOnlyMongoRepository<TKey>,
|
||||
IKeyTypedBaseMongoDbRepository<TKey>
|
||||
public abstract partial class BaseMongoRepository<TKey> :
|
||||
ReadOnlyMongoRepository<TKey>,
|
||||
IBaseMongoDbRepository<TKey>
|
||||
where TKey : IEquatable<TKey>
|
||||
{
|
||||
protected readonly object _initLock = new object();
|
||||
@@ -31,7 +31,7 @@ namespace MongoDbGenericRepository
|
||||
/// </summary>
|
||||
/// <param name="connectionString">The connection string of the MongoDb server.</param>
|
||||
/// <param name="databaseName">The name of the database against which you want to perform operations.</param>
|
||||
protected KeyTypedBaseMongoDbRepository(string connectionString, string databaseName = null) : base(connectionString, databaseName)
|
||||
protected BaseMongoRepository(string connectionString, string databaseName = null) : base(connectionString, databaseName)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace MongoDbGenericRepository
|
||||
/// The contructor taking a <see cref="IMongoDbContext"/>.
|
||||
/// </summary>
|
||||
/// <param name="mongoDbContext">A mongodb context implementing <see cref="IMongoDbContext"/></param>
|
||||
protected KeyTypedBaseMongoDbRepository(IMongoDbContext mongoDbContext) : base(mongoDbContext)
|
||||
protected BaseMongoRepository(IMongoDbContext mongoDbContext) : base(mongoDbContext)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace MongoDbGenericRepository
|
||||
/// The contructor taking a <see cref="IMongoDatabase"/>.
|
||||
/// </summary>
|
||||
/// <param name="mongoDatabase">A mongodb context implementing <see cref="IMongoDatabase"/></param>
|
||||
protected KeyTypedBaseMongoDbRepository(IMongoDatabase mongoDatabase) : base(mongoDatabase)
|
||||
protected BaseMongoRepository(IMongoDatabase mongoDatabase) : base(mongoDatabase)
|
||||
{
|
||||
}
|
||||
|
||||
+4
-4
@@ -13,7 +13,7 @@ namespace MongoDbGenericRepository
|
||||
/// The base Repository, it is meant to be inherited from by your custom custom MongoRepository implementation.
|
||||
/// Its constructor must be given a connection string and a database name.
|
||||
/// </summary>
|
||||
public abstract partial class KeyTypedReadOnlyMongoRepository<TKey> : IKeyTypedReadOnlyMongoRepository<TKey> where TKey : IEquatable<TKey>
|
||||
public abstract partial class ReadOnlyMongoRepository<TKey> : IReadOnlyMongoRepository<TKey> where TKey : IEquatable<TKey>
|
||||
{
|
||||
/// <summary>
|
||||
/// The connection string.
|
||||
@@ -40,7 +40,7 @@ namespace MongoDbGenericRepository
|
||||
/// </summary>
|
||||
/// <param name="connectionString">The connection string of the MongoDb server.</param>
|
||||
/// <param name="databaseName">The name of the database against which you want to perform operations.</param>
|
||||
protected KeyTypedReadOnlyMongoRepository(string connectionString, string databaseName = null)
|
||||
protected ReadOnlyMongoRepository(string connectionString, string databaseName = null)
|
||||
{
|
||||
SetupMongoDbContext(connectionString, databaseName);
|
||||
}
|
||||
@@ -49,7 +49,7 @@ namespace MongoDbGenericRepository
|
||||
/// The contructor taking a <see cref="IMongoDatabase"/>.
|
||||
/// </summary>
|
||||
/// <param name="mongoDatabase">A mongodb context implementing <see cref="IMongoDatabase"/></param>
|
||||
protected KeyTypedReadOnlyMongoRepository(IMongoDatabase mongoDatabase) : this(new MongoDbContext(mongoDatabase))
|
||||
protected ReadOnlyMongoRepository(IMongoDatabase mongoDatabase) : this(new MongoDbContext(mongoDatabase))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace MongoDbGenericRepository
|
||||
/// The contructor taking a <see cref="IMongoDbContext"/>.
|
||||
/// </summary>
|
||||
/// <param name="mongoDbContext">A mongodb context implementing <see cref="IMongoDbContext"/></param>
|
||||
protected KeyTypedReadOnlyMongoRepository(IMongoDbContext mongoDbContext)
|
||||
protected ReadOnlyMongoRepository(IMongoDbContext mongoDbContext)
|
||||
{
|
||||
SetupMongoDbContext(mongoDbContext);
|
||||
}
|
||||
+2
-2
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace MongoDbGenericRepository
|
||||
{
|
||||
public interface IKeyTypedBaseMongoDbRepository_Update<TKey> where TKey : IEquatable<TKey>
|
||||
public interface IBaseMongoRepository_Update<TKey> where TKey : IEquatable<TKey>
|
||||
{
|
||||
/// <summary>
|
||||
/// Asynchronously Updates a document.
|
||||
@@ -112,7 +112,7 @@ namespace MongoDbGenericRepository
|
||||
where TDocument : IDocument<TKey>;
|
||||
}
|
||||
|
||||
public abstract partial class KeyTypedBaseMongoDbRepository<TKey> : IKeyTypedBaseMongoDbRepository_Update<TKey>
|
||||
public abstract partial class BaseMongoRepository<TKey> : IBaseMongoRepository_Update<TKey>
|
||||
where TKey : IEquatable<TKey>
|
||||
{
|
||||
private MongoDbUpdater _mongoDbUpdater;
|
||||
@@ -13,7 +13,7 @@ namespace MongoDbGenericRepository
|
||||
/// The base Repository, it is meant to be inherited from by your custom custom MongoRepository implementation.
|
||||
/// Its constructor must be given a connection string and a database name.
|
||||
/// </summary>
|
||||
public abstract class ReadOnlyMongoRepository : KeyTypedReadOnlyMongoRepository<Guid>, IReadOnlyMongoRepository
|
||||
public abstract class ReadOnlyMongoRepository : ReadOnlyMongoRepository<Guid>, IReadOnlyMongoRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// The constructor taking a connection string and a database name.
|
||||
|
||||
Reference in New Issue
Block a user