Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
Remove unused SetCollection method from IRepository.cs and its implementations
support37b5f419d8e3
diff --git a/src/Core/Grand.Data/IRepository.cs b/src/Core/Grand.Data/IRepository.csindex c144bafe6..3634f3606 100644--- a/src/Core/Grand.Data/IRepository.cs+++ b/src/Core/Grand.Data/IRepository.cs@@ -12,12 +12,7 @@ public interface IRepository<T> where T : BaseEntity/// Gets a table/// </summary>IQueryable<T> Table { get; }-- /// <summary>- /// Sets a collection- /// </summary>- bool SetCollection(string collectionName);-+/// <summary>/// Get entity by identifierdiff --git a/src/Core/Grand.Data/LiteDb/LiteDBRepository.cs b/src/Core/Grand.Data/LiteDb/LiteDBRepository.csindex d8990feeb..f5b7d99c8 100644--- a/src/Core/Grand.Data/LiteDb/LiteDBRepository.cs+++ b/src/Core/Grand.Data/LiteDb/LiteDBRepository.cs@@ -21,16 +21,7 @@ public class LiteDBRepository<T> : IRepository<T> where T : BaseEntityprotected ILiteCollection<T> _collection;public ILiteCollection<T> Collection => _collection;-- /// <summary>- /// Sets a collection- /// </summary>- public bool SetCollection(string collectionName)- {- _collection = _database.GetCollection<T>(collectionName);- return true;- }-+/// <summary>/// Mongo Database/// </summary>diff --git a/src/Core/Grand.Data/Mongo/MongoRepository.cs b/src/Core/Grand.Data/Mongo/MongoRepository.csindex 1c94d7388..1f27aba52 100644--- a/src/Core/Grand.Data/Mongo/MongoRepository.cs+++ b/src/Core/Grand.Data/Mongo/MongoRepository.cs@@ -21,15 +21,6 @@ public class MongoRepository<T> : IRepository<T> where T : BaseEntitypublic IMongoCollection<T> Collection => _collection;- /// <summary>- /// Sets a collection- /// </summary>- public bool SetCollection(string collectionName)- {- _collection = _collection.Database.GetCollection<T>(collectionName);- return true;- }-/// <summary>/// Mongo Database/// </summary>