diff --git a/src/Cnblogs.Architecture.Ddd.Cqrs.Abstractions/Cnblogs.Architecture.Ddd.Cqrs.Abstractions.csproj b/src/Cnblogs.Architecture.Ddd.Cqrs.Abstractions/Cnblogs.Architecture.Ddd.Cqrs.Abstractions.csproj
index 4298a09..a3d6d3e 100644
--- a/src/Cnblogs.Architecture.Ddd.Cqrs.Abstractions/Cnblogs.Architecture.Ddd.Cqrs.Abstractions.csproj
+++ b/src/Cnblogs.Architecture.Ddd.Cqrs.Abstractions/Cnblogs.Architecture.Ddd.Cqrs.Abstractions.csproj
@@ -17,7 +17,7 @@
-
+
diff --git a/src/Cnblogs.Architecture.Ddd.Cqrs.AspNetCore/Cnblogs.Architecture.Ddd.Cqrs.AspNetCore.csproj b/src/Cnblogs.Architecture.Ddd.Cqrs.AspNetCore/Cnblogs.Architecture.Ddd.Cqrs.AspNetCore.csproj
index fb7ac33..9069513 100644
--- a/src/Cnblogs.Architecture.Ddd.Cqrs.AspNetCore/Cnblogs.Architecture.Ddd.Cqrs.AspNetCore.csproj
+++ b/src/Cnblogs.Architecture.Ddd.Cqrs.AspNetCore/Cnblogs.Architecture.Ddd.Cqrs.AspNetCore.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/src/Cnblogs.Architecture.Ddd.Cqrs.Dapper.SqlServer/Cnblogs.Architecture.Ddd.Cqrs.Dapper.SqlServer.csproj b/src/Cnblogs.Architecture.Ddd.Cqrs.Dapper.SqlServer/Cnblogs.Architecture.Ddd.Cqrs.Dapper.SqlServer.csproj
index 3a66b38..2385ae8 100644
--- a/src/Cnblogs.Architecture.Ddd.Cqrs.Dapper.SqlServer/Cnblogs.Architecture.Ddd.Cqrs.Dapper.SqlServer.csproj
+++ b/src/Cnblogs.Architecture.Ddd.Cqrs.Dapper.SqlServer/Cnblogs.Architecture.Ddd.Cqrs.Dapper.SqlServer.csproj
@@ -11,7 +11,7 @@
-
+
diff --git a/src/Cnblogs.Architecture.Ddd.Cqrs.MongoDb.Analyzer/Cnblogs.Architecture.Ddd.Cqrs.MongoDb.Analyzer.csproj b/src/Cnblogs.Architecture.Ddd.Cqrs.MongoDb.Analyzer/Cnblogs.Architecture.Ddd.Cqrs.MongoDb.Analyzer.csproj
index 68b469a..b313693 100644
--- a/src/Cnblogs.Architecture.Ddd.Cqrs.MongoDb.Analyzer/Cnblogs.Architecture.Ddd.Cqrs.MongoDb.Analyzer.csproj
+++ b/src/Cnblogs.Architecture.Ddd.Cqrs.MongoDb.Analyzer/Cnblogs.Architecture.Ddd.Cqrs.MongoDb.Analyzer.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/src/Cnblogs.Architecture.Ddd.Cqrs.MongoDb/MongoPageableQueryHandler.cs b/src/Cnblogs.Architecture.Ddd.Cqrs.MongoDb/MongoPageableQueryHandler.cs
index 5f9e6e1..a572c01 100644
--- a/src/Cnblogs.Architecture.Ddd.Cqrs.MongoDb/MongoPageableQueryHandler.cs
+++ b/src/Cnblogs.Architecture.Ddd.Cqrs.MongoDb/MongoPageableQueryHandler.cs
@@ -1,6 +1,5 @@
using Cnblogs.Architecture.Ddd.Cqrs.Abstractions;
-using MongoDB.Driver;
using MongoDB.Driver.Linq;
namespace Cnblogs.Architecture.Ddd.Cqrs.MongoDb;
@@ -18,12 +17,12 @@ public abstract class MongoPageableQueryHandler
///
protected override Task CountAsync(TQuery query, IQueryable queryable)
{
- return queryable.AsMongoQueryable().CountAsync();
+ return queryable.CountAsync();
}
///
protected override Task> ToListAsync(TQuery query, IQueryable queryable)
{
- return queryable.AsMongoQueryable().ToListAsync();
+ return queryable.ToListAsync();
}
-}
\ No newline at end of file
+}
diff --git a/src/Cnblogs.Architecture.Ddd.Cqrs.MongoDb/MongoQueryableExtensions.cs b/src/Cnblogs.Architecture.Ddd.Cqrs.MongoDb/MongoQueryableExtensions.cs
deleted file mode 100644
index ba74d14..0000000
--- a/src/Cnblogs.Architecture.Ddd.Cqrs.MongoDb/MongoQueryableExtensions.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using MongoDB.Driver.Linq;
-
-namespace Cnblogs.Architecture.Ddd.Cqrs.MongoDb;
-
-///
-/// MongoDb Queryable 扩展方法。
-///
-public static class MongoQueryableExtensions
-{
- ///
- /// 将 转换为 。
- ///
- /// 输入的 IQueryable。
- /// 查询类型。
- /// 转换后的
- /// 输入的 不是 。
- public static IMongoQueryable AsMongoQueryable(this IQueryable queryable)
- {
- if (queryable is IMongoQueryable mongoQueryable)
- {
- return mongoQueryable;
- }
-
- throw new InvalidCastException("input is not mongo queryable");
- }
-}
\ No newline at end of file
diff --git a/src/Cnblogs.Architecture.Ddd.Cqrs.ServiceAgent/Cnblogs.Architecture.Ddd.Cqrs.ServiceAgent.csproj b/src/Cnblogs.Architecture.Ddd.Cqrs.ServiceAgent/Cnblogs.Architecture.Ddd.Cqrs.ServiceAgent.csproj
index fee9cc7..0abf125 100644
--- a/src/Cnblogs.Architecture.Ddd.Cqrs.ServiceAgent/Cnblogs.Architecture.Ddd.Cqrs.ServiceAgent.csproj
+++ b/src/Cnblogs.Architecture.Ddd.Cqrs.ServiceAgent/Cnblogs.Architecture.Ddd.Cqrs.ServiceAgent.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/src/Cnblogs.Architecture.Ddd.Domain.Abstractions/Cnblogs.Architecture.Ddd.Domain.Abstractions.csproj b/src/Cnblogs.Architecture.Ddd.Domain.Abstractions/Cnblogs.Architecture.Ddd.Domain.Abstractions.csproj
index d4cfea7..d5de275 100644
--- a/src/Cnblogs.Architecture.Ddd.Domain.Abstractions/Cnblogs.Architecture.Ddd.Domain.Abstractions.csproj
+++ b/src/Cnblogs.Architecture.Ddd.Domain.Abstractions/Cnblogs.Architecture.Ddd.Domain.Abstractions.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/src/Cnblogs.Architecture.Ddd.Infrastructure.MongoDb/Cnblogs.Architecture.Ddd.Infrastructure.MongoDb.csproj b/src/Cnblogs.Architecture.Ddd.Infrastructure.MongoDb/Cnblogs.Architecture.Ddd.Infrastructure.MongoDb.csproj
index 7b9ae97..f4e4317 100644
--- a/src/Cnblogs.Architecture.Ddd.Infrastructure.MongoDb/Cnblogs.Architecture.Ddd.Infrastructure.MongoDb.csproj
+++ b/src/Cnblogs.Architecture.Ddd.Infrastructure.MongoDb/Cnblogs.Architecture.Ddd.Infrastructure.MongoDb.csproj
@@ -10,7 +10,7 @@
-
+
diff --git a/src/Cnblogs.Architecture.Ddd.Infrastructure.MongoDb/MongoContextOptions.cs b/src/Cnblogs.Architecture.Ddd.Infrastructure.MongoDb/MongoContextOptions.cs
index 13d13fb..535ad17 100644
--- a/src/Cnblogs.Architecture.Ddd.Infrastructure.MongoDb/MongoContextOptions.cs
+++ b/src/Cnblogs.Architecture.Ddd.Infrastructure.MongoDb/MongoContextOptions.cs
@@ -1,5 +1,4 @@
using MongoDB.Driver;
-using MongoDB.Driver.Linq;
namespace Cnblogs.Architecture.Ddd.Infrastructure.MongoDb;
@@ -41,7 +40,6 @@ protected MongoContextOptions(string connectionString, string databaseName)
{
_databaseName = databaseName;
_settings = MongoClientSettings.FromConnectionString(connectionString);
- _settings.LinqProvider = LinqProvider.V3;
}
///
@@ -62,4 +60,4 @@ private IMongoClient GetClient()
_mongoClient ??= new MongoClient(_settings);
return _mongoClient;
}
-}
\ No newline at end of file
+}
diff --git a/test/Cnblogs.Architecture.IntegrationTestProject/Cnblogs.Architecture.IntegrationTestProject.csproj b/test/Cnblogs.Architecture.IntegrationTestProject/Cnblogs.Architecture.IntegrationTestProject.csproj
index 5cc6354..a8e0376 100644
--- a/test/Cnblogs.Architecture.IntegrationTestProject/Cnblogs.Architecture.IntegrationTestProject.csproj
+++ b/test/Cnblogs.Architecture.IntegrationTestProject/Cnblogs.Architecture.IntegrationTestProject.csproj
@@ -1,7 +1,7 @@
-
+
diff --git a/test/Cnblogs.Architecture.IntegrationTests/Cnblogs.Architecture.IntegrationTests.csproj b/test/Cnblogs.Architecture.IntegrationTests/Cnblogs.Architecture.IntegrationTests.csproj
index a90d002..ddc8f48 100644
--- a/test/Cnblogs.Architecture.IntegrationTests/Cnblogs.Architecture.IntegrationTests.csproj
+++ b/test/Cnblogs.Architecture.IntegrationTests/Cnblogs.Architecture.IntegrationTests.csproj
@@ -26,7 +26,7 @@
-
+