Skip to content

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.

Repository - change the type for Table object

KrzysztofPajake255d04cad3f
diff --git a/src/Core/Grand.Domain/Data/IRepository.cs b/src/Core/Grand.Domain/Data/IRepository.cs
index cceb27aa8..1dbb54602 100644
--- a/src/Core/Grand.Domain/Data/IRepository.cs
+++ b/src/Core/Grand.Domain/Data/IRepository.cs
@@ -1,6 +1,6 @@
-using MongoDB.Driver.Linq;
-using System;
+using System;
using System.Collections.Generic;
+using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
@@ -244,11 +244,11 @@ namespace Grand.Domain.Data
/// <summary>
/// Gets a table
/// </summary>
- IMongoQueryable<T> Table { get; }
+ IQueryable<T> Table { get; }
/// <summary>
/// Gets a table collection
/// </summary>
- IMongoQueryable<T> TableCollection(string collectionName);
+ IQueryable<T> TableCollection(string collectionName);
}
}
diff --git a/src/Core/Grand.Domain/Data/Mongo/MongoRepository.cs b/src/Core/Grand.Domain/Data/Mongo/MongoRepository.cs
index 6a3f68a9f..2b52dd141 100644
--- a/src/Core/Grand.Domain/Data/Mongo/MongoRepository.cs
+++ b/src/Core/Grand.Domain/Data/Mongo/MongoRepository.cs
@@ -479,14 +479,14 @@ namespace Grand.Domain.Data.Mongo
/// <summary>
/// Gets a table
/// </summary>
- public virtual IMongoQueryable<T> Table {
+ public virtual IQueryable<T> Table {
get { return _collection.AsQueryable(); }
}
/// <summary>
/// Gets a table collection
/// </summary>
- public virtual IMongoQueryable<T> TableCollection(string collectionName)
+ public virtual IQueryable<T> TableCollection(string collectionName)
{
return _collection.Database.GetCollection<T>(collectionName).AsQueryable();
}