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.

Minor improvements

KrzysztofPajakd37985845344
diff --git a/src/Business/Grand.Business.Customers/Services/CustomerService.cs b/src/Business/Grand.Business.Customers/Services/CustomerService.cs
index 6affe86d4..9d23febfa 100644
--- a/src/Business/Grand.Business.Customers/Services/CustomerService.cs
+++ b/src/Business/Grand.Business.Customers/Services/CustomerService.cs
@@ -346,12 +346,7 @@ namespace Grand.Business.Customers.Services
if (string.IsNullOrEmpty(customerId))
throw new ArgumentNullException("customerId");
- var builder = Builders<Customer>.Filter;
- var filter = builder.Eq(x => x.Id, customerId);
- var update = Builders<Customer>.Update
- .Set(expression, value);
-
- await _customerRepository.Collection.UpdateOneAsync(filter, update);
+ await _customerRepository.UpdateField<T>(customerId, expression, value);
}
/// <summary>