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
Update nuget MongoDB packages
KrzysztofPajak586b9e643363
diff --git a/src/Core/Grand.Data/Grand.Data.csproj b/src/Core/Grand.Data/Grand.Data.csprojindex b1c6c0706..4f315f041 100644--- a/src/Core/Grand.Data/Grand.Data.csproj+++ b/src/Core/Grand.Data/Grand.Data.csproj@@ -2,10 +2,10 @@<Import Project="..\..\Build\Grand.Common.props" /><ItemGroup><PackageReference Include="LiteDB" Version="5.0.17" />- <PackageReference Include="MongoDB.Bson" Version="2.28.0" />- <PackageReference Include="MongoDB.Driver" Version="2.28.0" />- <PackageReference Include="MongoDB.Driver.Core" Version="2.28.0" />- <PackageReference Include="MongoDB.Driver.GridFS" Version="2.28.0" />+ <PackageReference Include="MongoDB.Bson" Version="2.30.0" />+ <PackageReference Include="MongoDB.Driver" Version="2.30.0" />+ <PackageReference Include="MongoDB.Driver.Core" Version="2.30.0" />+ <PackageReference Include="MongoDB.Driver.GridFS" Version="2.30.0" /><PackageReference Include="DotLiquid" Version="2.2.692" /></ItemGroup>diff --git a/src/Core/Grand.Data/Mongo/MongoStoreFilesContext.cs b/src/Core/Grand.Data/Mongo/MongoStoreFilesContext.csindex f1e437540..3a7ecace1 100644--- a/src/Core/Grand.Data/Mongo/MongoStoreFilesContext.cs+++ b/src/Core/Grand.Data/Mongo/MongoStoreFilesContext.cs@@ -25,7 +25,7 @@ public class MongoStoreFilesContext : IStoreFilesContextpublic async Task<byte[]> BucketDownload(string id){var bucket = new GridFSBucket(_database);- var binary = await bucket.DownloadAsBytesAsync(new ObjectId(id), new GridFSDownloadOptions { CheckMD5 = true });+ var binary = await bucket.DownloadAsBytesAsync(new ObjectId(id), new GridFSDownloadOptions());return binary;}diff --git a/src/Core/Grand.Domain/Grand.Domain.csproj b/src/Core/Grand.Domain/Grand.Domain.csprojindex 8e33a5df9..b5b322f57 100644--- a/src/Core/Grand.Domain/Grand.Domain.csproj+++ b/src/Core/Grand.Domain/Grand.Domain.csproj@@ -1,7 +1,7 @@<Project Sdk="Microsoft.NET.Sdk"><Import Project="..\..\Build\Grand.Common.props" /><ItemGroup>- <PackageReference Include="MongoDB.Bson" Version="2.28.0" />+ <PackageReference Include="MongoDB.Bson" Version="2.30.0" /><PackageReference Include="DotLiquid" Version="2.2.692" /></ItemGroup>diff --git a/src/Tests/Grand.Data.Tests/MongoDb/CoreTestConfiguration.cs b/src/Tests/Grand.Data.Tests/MongoDb/CoreTestConfiguration.csindex 90f8d0f8e..9204a5e9a 100644--- a/src/Tests/Grand.Data.Tests/MongoDb/CoreTestConfiguration.cs+++ b/src/Tests/Grand.Data.Tests/MongoDb/CoreTestConfiguration.cs@@ -50,8 +50,6 @@ public static class CoreTestConfigurationpublic static DatabaseNamespace DatabaseNamespace { get; } = GetDatabaseNamespace();- public static MessageEncoderSettings MessageEncoderSettings { get; } = new();-public static TraceSource TraceSource { get; private set; }// static methods@@ -108,25 +106,9 @@ public static class CoreTestConfigurationvar hasWritableServer = 0;var builder = ConfigureCluster();var cluster = builder.BuildCluster();- cluster.DescriptionChanged += (o, e) =>- {- var anyWritableServer = e.NewClusterDescription.Servers.Any(- description => description.Type.IsWritable());- if (TraceSource != null)- {- TraceSource.TraceEvent(TraceEventType.Information, 0,- "CreateCluster: DescriptionChanged event handler called.");- TraceSource.TraceEvent(TraceEventType.Information, 0,- $"CreateCluster: anyWritableServer = {anyWritableServer}.");- TraceSource.TraceEvent(TraceEventType.Information, 0,- $"CreateCluster: new description: {e.NewClusterDescription}.");- }-- Interlocked.Exchange(ref hasWritableServer, anyWritableServer ? 1 : 0);- };+if (TraceSource != null)TraceSource.TraceEvent(TraceEventType.Information, 0, "CreateCluster: initializing cluster.");- cluster.Initialize();// wait until the cluster has connected to a writable serverSpinWait.SpinUntil(() => Interlocked.CompareExchange(ref hasWritableServer, 0, 0) != 0,