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.

Further changes with save activity log

KrzysztofPajak208178deea31
diff --git a/src/API/Grand.Api/Commands/Handlers/Catalog/AddBrandCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Catalog/AddBrandCommandHandler.cs
index b0c4fc73b..78e010681 100644
--- a/src/API/Grand.Api/Commands/Handlers/Catalog/AddBrandCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Catalog/AddBrandCommandHandler.cs
@@ -54,7 +54,7 @@ namespace Grand.Api.Commands.Models.Catalog
await _slugService.SaveSlug(brand, request.Model.SeName, "");
//activity log
- await _customerActivityService.InsertActivity("AddNewBrand", brand.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.AddNewBrand"), brand.Name);
+ _ = _customerActivityService.InsertActivity("AddNewBrand", brand.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.AddNewBrand"), brand.Name);
return brand.ToModel();
}
diff --git a/src/API/Grand.Api/Commands/Handlers/Catalog/AddCategoryCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Catalog/AddCategoryCommandHandler.cs
index 128a9588e..6b8a9889d 100644
--- a/src/API/Grand.Api/Commands/Handlers/Catalog/AddCategoryCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Catalog/AddCategoryCommandHandler.cs
@@ -55,7 +55,7 @@ namespace Grand.Api.Commands.Models.Catalog
await _slugService.SaveSlug(category, request.Model.SeName, "");
//activity log
- await _customerActivityService.InsertActivity("AddNewCategory", category.Id, _workContext.CurrentCustomer, "",
+ _ = _customerActivityService.InsertActivity("AddNewCategory", category.Id, _workContext.CurrentCustomer, "",
_translationService.GetResource("ActivityLog.AddNewCategory"), category.Name);
return category.ToModel();
diff --git a/src/API/Grand.Api/Commands/Handlers/Catalog/AddCollectionCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Catalog/AddCollectionCommandHandler.cs
index c4c8f6884..fc551bfcc 100644
--- a/src/API/Grand.Api/Commands/Handlers/Catalog/AddCollectionCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Catalog/AddCollectionCommandHandler.cs
@@ -54,7 +54,7 @@ namespace Grand.Api.Commands.Models.Catalog
await _slugService.SaveSlug(collection, request.Model.SeName, "");
//activity log
- await _customerActivityService.InsertActivity("AddNewCollection", collection.Id,
+ _ = _customerActivityService.InsertActivity("AddNewCollection", collection.Id,
_workContext.CurrentCustomer, "",
_translationService.GetResource("ActivityLog.AddNewCollection"), collection.Name);
diff --git a/src/API/Grand.Api/Commands/Handlers/Catalog/AddProductAttributeCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Catalog/AddProductAttributeCommandHandler.cs
index 4057999d1..85cd4727b 100644
--- a/src/API/Grand.Api/Commands/Handlers/Catalog/AddProductAttributeCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Catalog/AddProductAttributeCommandHandler.cs
@@ -37,7 +37,7 @@ namespace Grand.Api.Commands.Handlers.Catalog
await _productAttributeService.InsertProductAttribute(productAttribute);
//activity log
- await _customerActivityService.InsertActivity("AddNewProductAttribute",
+ _ = _customerActivityService.InsertActivity("AddNewProductAttribute",
productAttribute.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.AddNewProductAttribute"), productAttribute.Name);
return productAttribute.ToModel();
diff --git a/src/API/Grand.Api/Commands/Handlers/Catalog/AddProductCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Catalog/AddProductCommandHandler.cs
index edf991001..a97bf231f 100644
--- a/src/API/Grand.Api/Commands/Handlers/Catalog/AddProductCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Catalog/AddProductCommandHandler.cs
@@ -57,7 +57,7 @@ namespace Grand.Api.Commands.Models.Catalog
await _productService.UpdateProduct(product);
//activity log
- await _customerActivityService.InsertActivity("AddNewProduct", product.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.AddNewProduct"), product.Name);
+ _ = _customerActivityService.InsertActivity("AddNewProduct", product.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.AddNewProduct"), product.Name);
return product.ToModel();
}
diff --git a/src/API/Grand.Api/Commands/Handlers/Catalog/AddSpecificationAttributeCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Catalog/AddSpecificationAttributeCommandHandler.cs
index d7d4728ec..bb65e21d3 100644
--- a/src/API/Grand.Api/Commands/Handlers/Catalog/AddSpecificationAttributeCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Catalog/AddSpecificationAttributeCommandHandler.cs
@@ -36,7 +36,7 @@ namespace Grand.Api.Commands.Handlers.Catalog
await _specificationAttributeService.InsertSpecificationAttribute(specificationAttribute);
//activity log
- await _customerActivityService.InsertActivity("AddNewSpecAttribute", specificationAttribute.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.AddNewSpecAttribute"), specificationAttribute.Name);
+ _ = _customerActivityService.InsertActivity("AddNewSpecAttribute", specificationAttribute.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.AddNewSpecAttribute"), specificationAttribute.Name);
return specificationAttribute.ToModel();
}
diff --git a/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteBrandCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteBrandCommandHandler.cs
index a6a7ce40a..453e01bf8 100644
--- a/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteBrandCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteBrandCommandHandler.cs
@@ -35,7 +35,7 @@ namespace Grand.Api.Commands.Models.Catalog
await _brandService.DeleteBrand(brand);
//activity log
- await _customerActivityService.InsertActivity("DeleteBrand", brand.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.DeleteBrand"), brand.Name);
+ _ = _customerActivityService.InsertActivity("DeleteBrand", brand.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.DeleteBrand"), brand.Name);
}
return true;
}
diff --git a/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteCategoryCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteCategoryCommandHandler.cs
index a72ec242a..03edda55b 100644
--- a/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteCategoryCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteCategoryCommandHandler.cs
@@ -35,7 +35,7 @@ namespace Grand.Api.Commands.Models.Catalog
await _categoryService.DeleteCategory(category);
//activity log
- await _customerActivityService.InsertActivity("DeleteCategory", category.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.DeleteCategory"), category.Name);
+ _ = _customerActivityService.InsertActivity("DeleteCategory", category.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.DeleteCategory"), category.Name);
}
return true;
}
diff --git a/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteCollectionCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteCollectionCommandHandler.cs
index 3f6eba840..088dc1eec 100644
--- a/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteCollectionCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteCollectionCommandHandler.cs
@@ -35,7 +35,7 @@ namespace Grand.Api.Commands.Models.Catalog
await _collectionService.DeleteCollection(collection);
//activity log
- await _customerActivityService.InsertActivity("DeleteCollection", collection.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.DeleteCollection"), collection.Name);
+ _ = _customerActivityService.InsertActivity("DeleteCollection", collection.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.DeleteCollection"), collection.Name);
}
return true;
}
diff --git a/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteProductAttributeCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteProductAttributeCommandHandler.cs
index 2c8df83fa..9ab358f68 100644
--- a/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteProductAttributeCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteProductAttributeCommandHandler.cs
@@ -35,7 +35,7 @@ namespace Grand.Api.Commands.Handlers.Catalog
{
await _productAttributeService.DeleteProductAttribute(productAttribute);
//activity log
- await _customerActivityService.InsertActivity("DeleteProductAttribute", productAttribute.Id,
+ _ = _customerActivityService.InsertActivity("DeleteProductAttribute", productAttribute.Id,
_workContext.CurrentCustomer, "",
_translationService.GetResource("ActivityLog.DeleteProductAttribute"), productAttribute.Name);
}
diff --git a/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteProductCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteProductCommandHandler.cs
index 620f9a0ea..deb52bf20 100644
--- a/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteProductCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteProductCommandHandler.cs
@@ -35,7 +35,7 @@ namespace Grand.Api.Commands.Models.Catalog
await _productService.DeleteProduct(product);
//activity log
- await _customerActivityService.InsertActivity("DeleteProduct", product.Id,
+ _ = _customerActivityService.InsertActivity("DeleteProduct", product.Id,
_workContext.CurrentCustomer, "",
_translationService.GetResource("ActivityLog.DeleteProduct"), product.Name);
}
diff --git a/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteSpecificationAttributeCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteSpecificationAttributeCommandHandler.cs
index c5831c80c..32f6fde50 100644
--- a/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteSpecificationAttributeCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Catalog/DeleteSpecificationAttributeCommandHandler.cs
@@ -35,7 +35,7 @@ namespace Grand.Api.Commands.Handlers.Catalog
{
await _specificationAttributeService.DeleteSpecificationAttribute(specificationAttribute);
//activity log
- await _customerActivityService.InsertActivity("DeleteSpecAttribute", specificationAttribute.Id,
+ _ = _customerActivityService.InsertActivity("DeleteSpecAttribute", specificationAttribute.Id,
_workContext.CurrentCustomer, "",
_translationService.GetResource("ActivityLog.DeleteSpecAttribute"), specificationAttribute.Name);
}
diff --git a/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateBrandCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateBrandCommandHandler.cs
index fcfa9e57f..305529e81 100644
--- a/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateBrandCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateBrandCommandHandler.cs
@@ -74,7 +74,7 @@ namespace Grand.Api.Commands.Models.Catalog
await _pictureService.SetSeoFilename(picture, _pictureService.GetPictureSeName(brand.Name));
}
//activity log
- await _customerActivityService.InsertActivity("EditBrand", brand.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.EditBrand"), brand.Name);
+ _ = _customerActivityService.InsertActivity("EditBrand", brand.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.EditBrand"), brand.Name);
return brand.ToModel();
}
diff --git a/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateCategoryCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateCategoryCommandHandler.cs
index 18bc25f05..e4e24232e 100644
--- a/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateCategoryCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateCategoryCommandHandler.cs
@@ -74,7 +74,7 @@ namespace Grand.Api.Commands.Models.Catalog
await _pictureService.SetSeoFilename(picture, _pictureService.GetPictureSeName(category.Name));
}
//activity log
- await _customerActivityService.InsertActivity("EditCategory", category.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.EditCategory"), category.Name);
+ _ = _customerActivityService.InsertActivity("EditCategory", category.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.EditCategory"), category.Name);
return category.ToModel();
}
}
diff --git a/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateCollectionCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateCollectionCommandHandler.cs
index 2475fa989..d19c5ea1f 100644
--- a/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateCollectionCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateCollectionCommandHandler.cs
@@ -74,7 +74,7 @@ namespace Grand.Api.Commands.Models.Catalog
await _pictureService.SetSeoFilename(picture, _pictureService.GetPictureSeName(collection.Name));
}
//activity log
- await _customerActivityService.InsertActivity("EditCollection", collection.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.EditCollection"), collection.Name);
+ _ = _customerActivityService.InsertActivity("EditCollection", collection.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.EditCollection"), collection.Name);
return collection.ToModel();
}
diff --git a/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateProductAttributeCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateProductAttributeCommandHandler.cs
index 096dcbe09..90b2d1b6d 100644
--- a/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateProductAttributeCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateProductAttributeCommandHandler.cs
@@ -38,7 +38,7 @@ namespace Grand.Api.Commands.Handlers.Catalog
await _productAttributeService.UpdateProductAttribute(productAttribute);
//activity log
- await _customerActivityService.InsertActivity("EditProductAttribute", productAttribute.Id,
+ _ = _customerActivityService.InsertActivity("EditProductAttribute", productAttribute.Id,
_workContext.CurrentCustomer, "",
_translationService.GetResource("ActivityLog.EditProductAttribute"), productAttribute.Name);
diff --git a/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateProductCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateProductCommandHandler.cs
index cf4517f98..0dd8bb307 100644
--- a/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateProductCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateProductCommandHandler.cs
@@ -81,7 +81,7 @@ namespace Grand.Api.Commands.Models.Catalog
}
//activity log
- await _customerActivityService.InsertActivity("EditProduct", product.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.EditProduct"), product.Name);
+ _ = _customerActivityService.InsertActivity("EditProduct", product.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.EditProduct"), product.Name);
//raise event
if (!prevPublished && product.Published)
diff --git a/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateProductStockCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateProductStockCommandHandler.cs
index 1084713bc..3f58a3ab1 100644
--- a/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateProductStockCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateProductStockCommandHandler.cs
@@ -87,7 +87,7 @@ namespace Grand.Api.Commands.Models.Catalog
await OutOfStockNotifications(product, prevStockQuantity, prevMultiWarehouseStock);
//activity log
- await _customerActivityService.InsertActivity("EditProduct", product.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.EditProduct"), product.Name);
+ _ = _customerActivityService.InsertActivity("EditProduct", product.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.EditProduct"), product.Name);
}
return true;
diff --git a/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateSpecificationAttributeCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateSpecificationAttributeCommandHandler.cs
index 3984818ee..d9ec90046 100644
--- a/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateSpecificationAttributeCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Catalog/UpdateSpecificationAttributeCommandHandler.cs
@@ -45,7 +45,7 @@ namespace Grand.Api.Commands.Handlers.Catalog
await _specificationAttributeService.UpdateSpecificationAttribute(specificationAttribute);
//activity log
- await _customerActivityService.InsertActivity("EditSpecAttribute",
+ _ = _customerActivityService.InsertActivity("EditSpecAttribute",
specificationAttribute.Id, _workContext.CurrentCustomer, "",
_translationService.GetResource("ActivityLog.EditSpecAttribute"), specificationAttribute.Name);
diff --git a/src/API/Grand.Api/Commands/Handlers/Customers/AddCustomerCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Customers/AddCustomerCommandHandler.cs
index 6cd73fe97..6ff33c2a5 100644
--- a/src/API/Grand.Api/Commands/Handlers/Customers/AddCustomerCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Customers/AddCustomerCommandHandler.cs
@@ -53,7 +53,7 @@ namespace Grand.Api.Commands.Handlers.Customers
await SaveCustomerGroups(request.Model, customer);
//activity log
- await _customerActivityService.InsertActivity("AddNewCustomer", customer.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.AddNewCustomer"), customer.Id);
+ _ = _customerActivityService.InsertActivity("AddNewCustomer", customer.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.AddNewCustomer"), customer.Id);
return customer.ToModel();
}
diff --git a/src/API/Grand.Api/Commands/Handlers/Customers/AddCustomerGroupCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Customers/AddCustomerGroupCommandHandler.cs
index 6781ff648..848eff7ff 100644
--- a/src/API/Grand.Api/Commands/Handlers/Customers/AddCustomerGroupCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Customers/AddCustomerGroupCommandHandler.cs
@@ -35,7 +35,7 @@ namespace Grand.Api.Commands.Models.Customers
await _groupService.InsertCustomerGroup(customergroup);
//activity log
- await _customerActivityService.InsertActivity("AddNewCustomerGroup", customergroup.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.AddNewCustomerGroup"), customergroup.Name);
+ _ = _customerActivityService.InsertActivity("AddNewCustomerGroup", customergroup.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.AddNewCustomerGroup"), customergroup.Name);
return customergroup.ToModel();
}
diff --git a/src/API/Grand.Api/Commands/Handlers/Customers/DeleteCustomerCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Customers/DeleteCustomerCommandHandler.cs
index be04cc8a5..d3e881bd8 100644
--- a/src/API/Grand.Api/Commands/Handlers/Customers/DeleteCustomerCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Customers/DeleteCustomerCommandHandler.cs
@@ -35,7 +35,7 @@ namespace Grand.Api.Commands.Handlers.Customers
{
await _customerService.DeleteCustomer(customer);
//activity log
- await _customerActivityService.InsertActivity("DeleteCustomer", customer.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.DeleteCustomer"), customer.Id);
+ _ = _customerActivityService.InsertActivity("DeleteCustomer", customer.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.DeleteCustomer"), customer.Id);
}
return true;
diff --git a/src/API/Grand.Api/Commands/Handlers/Customers/DeleteCustomerGroupCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Customers/DeleteCustomerGroupCommandHandler.cs
index ac1761670..efa11398e 100644
--- a/src/API/Grand.Api/Commands/Handlers/Customers/DeleteCustomerGroupCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Customers/DeleteCustomerGroupCommandHandler.cs
@@ -35,7 +35,7 @@ namespace Grand.Api.Commands.Models.Customers
await _groupService.DeleteCustomerGroup(customerGroup);
//activity log
- await _customerActivityService.InsertActivity("DeleteCustomerGroup", customerGroup.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.DeleteCustomerGroup"), customerGroup.Name);
+ _ = _customerActivityService.InsertActivity("DeleteCustomerGroup", customerGroup.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.DeleteCustomerGroup"), customerGroup.Name);
}
return true;
}
diff --git a/src/API/Grand.Api/Commands/Handlers/Customers/UpdateCustomerCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Customers/UpdateCustomerCommandHandler.cs
index 73f6f1c34..bcc9dfbbd 100644
--- a/src/API/Grand.Api/Commands/Handlers/Customers/UpdateCustomerCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Customers/UpdateCustomerCommandHandler.cs
@@ -48,7 +48,7 @@ namespace Grand.Api.Commands.Handlers.Customers
await SaveCustomerGroups(request.Model, customer);
//activity log
- await _customerActivityService.InsertActivity("EditCustomer", customer.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.EditCustomer"), customer.Id);
+ _ = _customerActivityService.InsertActivity("EditCustomer", customer.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.EditCustomer"), customer.Id);
return customer.ToModel();
}
diff --git a/src/API/Grand.Api/Commands/Handlers/Customers/UpdateCustomerGroupCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Customers/UpdateCustomerGroupCommandHandler.cs
index b64f93edd..180e0d43f 100644
--- a/src/API/Grand.Api/Commands/Handlers/Customers/UpdateCustomerGroupCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Customers/UpdateCustomerGroupCommandHandler.cs
@@ -36,7 +36,7 @@ namespace Grand.Api.Commands.Models.Customers
await _groupService.UpdateCustomerGroup(customerGroup);
//activity log
- await _customerActivityService.InsertActivity("EditCustomerGroup", customerGroup.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.EditCustomerGroup"), customerGroup.Name);
+ _ = _customerActivityService.InsertActivity("EditCustomerGroup", customerGroup.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.EditCustomerGroup"), customerGroup.Name);
return customerGroup.ToModel();
}
diff --git a/src/Business/Grand.Business.Common/Interfaces/Logging/ICustomerActivityService.cs b/src/Business/Grand.Business.Common/Interfaces/Logging/ICustomerActivityService.cs
index 103228156..36ac11dac 100644
--- a/src/Business/Grand.Business.Common/Interfaces/Logging/ICustomerActivityService.cs
+++ b/src/Business/Grand.Business.Common/Interfaces/Logging/ICustomerActivityService.cs
@@ -53,7 +53,7 @@ namespace Grand.Business.Common.Interfaces.Logging
/// <param name="comment">The activity comment</param>
/// <param name="commentParams">The activity comment parameters for string.Format() function.</param>
/// <returns>Activity log item</returns>
- Task<ActivityLog> InsertActivity(string systemKeyword, string entityKeyId,
+ Task InsertActivity(string systemKeyword, string entityKeyId,
Customer customer, string ipAddress, string comment, params object[] commentParams);
diff --git a/src/Business/Grand.Business.Common/Services/Logging/CustomerActivityService.cs b/src/Business/Grand.Business.Common/Services/Logging/CustomerActivityService.cs
index db84a6ed5..045a1e653 100644
--- a/src/Business/Grand.Business.Common/Services/Logging/CustomerActivityService.cs
+++ b/src/Business/Grand.Business.Common/Services/Logging/CustomerActivityService.cs
@@ -56,13 +56,20 @@ namespace Grand.Business.Common.Services.Logging
protected virtual async Task<IList<ActivityLogType>> GetAllActivityTypesCached()
{
//cache
- string key = string.Format(CacheKey.ACTIVITYTYPE_ALL_KEY);
- return await _cacheBase.GetAsync(key, async () =>
+ return await _cacheBase.GetAsync(CacheKey.ACTIVITYTYPE_ALL_KEY, async () =>
{
return await GetAllActivityTypes();
});
}
+ /// <summary>
+ /// Gets all activity log types (caching)
+ /// </summary>
+ /// <returns>Activity log types</returns>
+ protected virtual IList<ActivityLogType> GetAllActivityTypesCachedSync()
+ {
+ return _cacheBase.Get(CacheKey.ACTIVITYTYPE_ALL_KEY, () => ActivityLogTypes().ToList());
+ }
#region Methods
@@ -105,16 +112,22 @@ namespace Grand.Business.Common.Services.Logging
await _cacheBase.RemoveByPrefix(CacheKey.ACTIVITYTYPE_PATTERN_KEY);
}
+ private IQueryable<ActivityLogType> ActivityLogTypes()
+ {
+ var query = from alt in _activityLogTypeRepository.Table
+ orderby alt.Name
+ select alt;
+
+ return query;
+ }
+
/// <summary>
/// Gets all activity log type items
/// </summary>
/// <returns>Activity log type items</returns>
public virtual async Task<IList<ActivityLogType>> GetAllActivityTypes()
- {
- var query = from alt in _activityLogTypeRepository.Table
- orderby alt.Name
- select alt;
- return await Task.FromResult(query.ToList());
+ {
+ return await Task.FromResult(ActivityLogTypes().ToList());
}
/// <summary>
@@ -141,14 +154,14 @@ namespace Grand.Business.Common.Services.Logging
/// <param name="comment">The activity comment</param>
/// <param name="commentParams">The activity comment parameters for string.Format() function.</param>
/// <returns>Activity log item</returns>
- public virtual async Task<ActivityLog> InsertActivity(string systemKeyword, string entityKeyId,
+ public virtual Task InsertActivity(string systemKeyword, string entityKeyId,
Customer customer, string ipAddress, string comment, params object[] commentParams)
{
if (customer == null)
return null;
- var activityTypes = await GetAllActivityTypesCached();
- var activityType = activityTypes.ToList().Find(at => at.SystemKeyword == systemKeyword);
+ var activityTypes = GetAllActivityTypesCachedSync();
+ var activityType = activityTypes.FirstOrDefault(at => at.SystemKeyword == systemKeyword);
if (activityType == null || !activityType.Enabled)
return null;
@@ -156,16 +169,17 @@ namespace Grand.Business.Common.Services.Logging
comment = string.Format(comment, commentParams);
comment = CommonHelper.EnsureMaximumLength(comment, 4000);
- var activity = new ActivityLog();
- activity.ActivityLogTypeId = activityType.Id;
- activity.CustomerId = customer.Id;
- activity.EntityKeyId = entityKeyId;
- activity.Comment = comment;
- activity.CreatedOnUtc = DateTime.UtcNow;
- activity.IpAddress = ipAddress;
- await _activityLogRepository.InsertAsync(activity);
-
- return activity;
+ var activity = new ActivityLog {
+ ActivityLogTypeId = activityType.Id,
+ CustomerId = customer.Id,
+ EntityKeyId = entityKeyId,
+ Comment = comment,
+ CreatedOnUtc = DateTime.UtcNow,
+ IpAddress = ipAddress
+ };
+ _activityLogRepository.InsertAsync(activity);
+
+ return Task.CompletedTask;
}
/// <summary>
diff --git a/src/Business/Grand.Business.Marketing/Events/CustomerLoggedInEventHandler.cs b/src/Business/Grand.Business.Marketing/Events/CustomerLoggedInEventHandler.cs
index ec3d3d4bd..18355f79a 100644
--- a/src/Business/Grand.Business.Marketing/Events/CustomerLoggedInEventHandler.cs
+++ b/src/Business/Grand.Business.Marketing/Events/CustomerLoggedInEventHandler.cs
@@ -20,10 +20,11 @@ namespace Grand.Business.Marketing.Events
_translationService = translationService;
}
- public async Task Handle(CustomerLoggedInEvent notification, CancellationToken cancellationToken)
+ public Task Handle(CustomerLoggedInEvent notification, CancellationToken cancellationToken)
{
//activity log
- await _customerActivityService.InsertActivity("PublicStore.Login", notification.Customer.Id, notification.Customer, "", _translationService.GetResource("ActivityLog.PublicStore.Login"));
+ _ = _customerActivityService.InsertActivity("PublicStore.Login", notification.Customer.Id, notification.Customer, "", _translationService.GetResource("ActivityLog.PublicStore.Login"));
+ return Task.CompletedTask;
}
}
}
diff --git a/src/Business/Grand.Business.Marketing/Events/CustomerLoggedOutEventHandler.cs b/src/Business/Grand.Business.Marketing/Events/CustomerLoggedOutEventHandler.cs
index 31a391f3d..6c0e55bba 100644
--- a/src/Business/Grand.Business.Marketing/Events/CustomerLoggedOutEventHandler.cs
+++ b/src/Business/Grand.Business.Marketing/Events/CustomerLoggedOutEventHandler.cs
@@ -20,10 +20,11 @@ namespace Grand.Business.Marketing.Events
_translationService = translationService;
}
- public async Task Handle(CustomerLoggedOutEvent notification, CancellationToken cancellationToken)
+ public Task Handle(CustomerLoggedOutEvent notification, CancellationToken cancellationToken)
{
//activity log
- await _customerActivityService.InsertActivity("PublicStore.Logout", "", notification.Customer, "", _translationService.GetResource("ActivityLog.PublicStore.Logout"));
+ _ = _customerActivityService.InsertActivity("PublicStore.Logout", "", notification.Customer, "", _translationService.GetResource("ActivityLog.PublicStore.Logout"));
+ return Task.CompletedTask;
}
}
}
diff --git a/src/Business/Grand.Business.Marketing/Services/Campaigns/CampaignService.cs b/src/Business/Grand.Business.Marketing/Services/Campaigns/CampaignService.cs
index 29729b9cf..ede34b816 100644
--- a/src/Business/Grand.Business.Marketing/Services/Campaigns/CampaignService.cs
+++ b/src/Business/Grand.Business.Marketing/Services/Campaigns/CampaignService.cs
@@ -360,7 +360,7 @@ namespace Grand.Business.Marketing.Services.Campaigns
//activity log
if (customer != null)
- await _customerActivityService.InsertActivity("CustomerReminder.SendCampaign", campaign.Id, customer, "", _translationService.GetResource("ActivityLog.SendCampaign"), campaign.Name);
+ _ = _customerActivityService.InsertActivity("CustomerReminder.SendCampaign", campaign.Id, customer, "", _translationService.GetResource("ActivityLog.SendCampaign"), campaign.Name);
totalEmailsSent++;
}
diff --git a/src/Business/Grand.Business.Marketing/Services/Customers/CustomerReminderService.cs b/src/Business/Grand.Business.Marketing/Services/Customers/CustomerReminderService.cs
index 929747f88..4efb181c1 100644
--- a/src/Business/Grand.Business.Marketing/Services/Customers/CustomerReminderService.cs
+++ b/src/Business/Grand.Business.Marketing/Services/Customers/CustomerReminderService.cs
@@ -134,7 +134,7 @@ namespace Grand.Business.Marketing.Services.Customers
await _queuedEmailService.InsertQueuedEmail(email);
//activity log
- await _customerActivityService.InsertActivity(string.Format("CustomerReminder.{0}", customerReminder.ReminderRuleId.ToString()), customer.Id, customer, "", _translationService.GetResource(string.Format("ActivityLog.{0}", customerReminder.ReminderRuleId.ToString())), customerReminder.Name);
+ _ = _customerActivityService.InsertActivity(string.Format("CustomerReminder.{0}", customerReminder.ReminderRuleId.ToString()), customer.Id, customer, "", _translationService.GetResource(string.Format("ActivityLog.{0}", customerReminder.ReminderRuleId.ToString())), customerReminder.Name);
return true;
}
@@ -207,7 +207,7 @@ namespace Grand.Business.Marketing.Services.Customers
await _queuedEmailService.InsertQueuedEmail(email);
//activity log
- await _customerActivityService.InsertActivity(string.Format("CustomerReminder.{0}", customerReminder.ReminderRuleId.ToString()), customer.Id, customer, "", string.Format("ActivityLog.{0}", customerReminder.ReminderRuleId.ToString()), customerReminder.Name);
+ _ = _customerActivityService.InsertActivity(string.Format("CustomerReminder.{0}", customerReminder.ReminderRuleId.ToString()), customer.Id, customer, "", string.Format("ActivityLog.{0}", customerReminder.ReminderRuleId.ToString()), customerReminder.Name);
return true;
}
diff --git a/src/Web/Grand.Web.Admin/Controllers/ContactAttributeController.cs b/src/Web/Grand.Web.Admin/Controllers/ContactAttributeController.cs
index 6e27ffcd7..752844226 100644
--- a/src/Web/Grand.Web.Admin/Controllers/ContactAttributeController.cs
+++ b/src/Web/Grand.Web.Admin/Controllers/ContactAttributeController.cs
@@ -164,7 +164,7 @@ namespace Grand.Web.Admin.Controllers
await _contactAttributeService.DeleteContactAttribute(contactAttribute);
//activity log
- await customerActivityService.InsertActivity("DeleteContactAttribute", contactAttribute.Id,
+ _ = customerActivityService.InsertActivity("DeleteContactAttribute", contactAttribute.Id,
workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteContactAttribute"), contactAttribute.Name);
diff --git a/src/Web/Grand.Web.Admin/Controllers/CustomerActionController.cs b/src/Web/Grand.Web.Admin/Controllers/CustomerActionController.cs
index 197d22758..da000d9f3 100644
--- a/src/Web/Grand.Web.Admin/Controllers/CustomerActionController.cs
+++ b/src/Web/Grand.Web.Admin/Controllers/CustomerActionController.cs
@@ -213,7 +213,7 @@ namespace Grand.Web.Admin.Controllers
try
{
//activity log
- await _customerActivityService.InsertActivity("DeleteCustomerAction", customerAction.Id,
+ _ = _customerActivityService.InsertActivity("DeleteCustomerAction", customerAction.Id,
workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteCustomerAction"), customerAction.Name);
await _customerActionService.DeleteCustomerAction(customerAction);
diff --git a/src/Web/Grand.Web.Admin/Controllers/DocumentController.cs b/src/Web/Grand.Web.Admin/Controllers/DocumentController.cs
index dce4fbae6..566d55db5 100644
--- a/src/Web/Grand.Web.Admin/Controllers/DocumentController.cs
+++ b/src/Web/Grand.Web.Admin/Controllers/DocumentController.cs
@@ -167,7 +167,7 @@ namespace Grand.Web.Admin.Controllers
await _documentTypeService.Insert(documenttype);
//activity log
- await _customerActivityService.InsertActivity("AddNewDocumentType", documenttype.Id,
+ _ = _customerActivityService.InsertActivity("AddNewDocumentType", documenttype.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.AddNewDocumentType"), documenttype.Name);
@@ -203,7 +203,7 @@ namespace Grand.Web.Admin.Controllers
await _documentTypeService.Update(documentType);
//activity log
- await _customerActivityService.InsertActivity("EditDocumentType", documentType.Id,
+ _ = _customerActivityService.InsertActivity("EditDocumentType", documentType.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditDocumentType"), documentType.Name);
@@ -227,7 +227,7 @@ namespace Grand.Web.Admin.Controllers
await _documentTypeService.Delete(documentType);
//activity log
- await _customerActivityService.InsertActivity("DeleteDocumentType", documentType.Id,
+ _ = _customerActivityService.InsertActivity("DeleteDocumentType", documentType.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteDocumentType"), documentType.Name);
diff --git a/src/Web/Grand.Web.Admin/Controllers/InteractiveFormController.cs b/src/Web/Grand.Web.Admin/Controllers/InteractiveFormController.cs
index 4fb6458cb..4877d822b 100644
--- a/src/Web/Grand.Web.Admin/Controllers/InteractiveFormController.cs
+++ b/src/Web/Grand.Web.Admin/Controllers/InteractiveFormController.cs
@@ -112,7 +112,7 @@ namespace Grand.Web.Admin.Controllers
form.CreatedOnUtc = DateTime.UtcNow;
await _interactiveFormService.InsertForm(form);
- await _customerActivityService.InsertActivity("InteractiveFormAdd", form.Id,
+ _ = _customerActivityService.InsertActivity("InteractiveFormAdd", form.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.InteractiveFormAdd"), form.Name);
@@ -164,7 +164,7 @@ namespace Grand.Web.Admin.Controllers
form = model.ToEntity(form);
await _interactiveFormService.UpdateForm(form);
- await _customerActivityService.InsertActivity("InteractiveFormEdit", form.Id,
+ _ = _customerActivityService.InsertActivity("InteractiveFormEdit", form.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.InteractiveFormUpdate"), form.Name);
@@ -196,7 +196,7 @@ namespace Grand.Web.Admin.Controllers
return RedirectToAction("List");
await _interactiveFormService.DeleteForm(form);
- await _customerActivityService.InsertActivity("InteractiveFormDelete", form.Id,
+ _ = _customerActivityService.InsertActivity("InteractiveFormDelete", form.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.InteractiveFormDeleted"), form.Name);
@@ -239,7 +239,7 @@ namespace Grand.Web.Admin.Controllers
form.FormAttributes.Remove(form.FormAttributes.FirstOrDefault(x => x.Id == id));
await _interactiveFormService.UpdateForm(form);
- await _customerActivityService.InsertActivity("InteractiveFormEdit", form.Id,
+ _ = _customerActivityService.InsertActivity("InteractiveFormEdit", form.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.InteractiveFormDeleteAttribute"), form.Name);
@@ -275,7 +275,7 @@ namespace Grand.Web.Admin.Controllers
form.FormAttributes.Add(attribute);
await _interactiveFormService.UpdateForm(form);
- await _customerActivityService.InsertActivity("InteractiveFormEdit", attribute.Id,
+ _ = _customerActivityService.InsertActivity("InteractiveFormEdit", attribute.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.InteractiveFormAddAttribute"), attribute.Name);
@@ -325,7 +325,7 @@ namespace Grand.Web.Admin.Controllers
{
attribute = model.ToEntity(attribute);
await _interactiveFormService.UpdateForm(form);
- await _customerActivityService.InsertActivity("InteractiveFormEdit", attribute.Id,
+ _ = _customerActivityService.InsertActivity("InteractiveFormEdit", attribute.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.InteractiveFormUpdateAttribute"), attribute.Name);
Success(_translationService.GetResource("admin.marketing.InteractiveForms.Attribute.Updated"));
@@ -406,7 +406,7 @@ namespace Grand.Web.Admin.Controllers
var vaf = model.ToEntity();
attribute.FormAttributeValues.Add(vaf);
await _interactiveFormService.UpdateForm(fo);
- await _customerActivityService.InsertActivity("InteractiveFormEdit", vaf.Id,
+ _ = _customerActivityService.InsertActivity("InteractiveFormEdit", vaf.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.InteractiveFormAddAttributeValue"), vaf.Name);
@@ -463,7 +463,7 @@ namespace Grand.Web.Admin.Controllers
{
vaf = model.ToEntity();
await _interactiveFormService.UpdateForm(fo);
- await _customerActivityService.InsertActivity("InteractiveFormEdit", vaf.Id,
+ _ = _customerActivityService.InsertActivity("InteractiveFormEdit", vaf.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.InteractiveFormUpdateAttributeValue"), vaf.Name);
return Content("");
@@ -489,7 +489,7 @@ namespace Grand.Web.Admin.Controllers
attribute.FormAttributeValues.Remove(vaf);
await _interactiveFormService.UpdateForm(form);
- await _customerActivityService.InsertActivity("InteractiveFormEdit", vaf.Id,
+ _ = _customerActivityService.InsertActivity("InteractiveFormEdit", vaf.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.InteractiveFormDeleteAttributeValue"), vaf.Name);
return new JsonResult("");
diff --git a/src/Web/Grand.Web.Admin/Controllers/OrderController.cs b/src/Web/Grand.Web.Admin/Controllers/OrderController.cs
index fcc92e867..6612cc4ec 100644
--- a/src/Web/Grand.Web.Admin/Controllers/OrderController.cs
+++ b/src/Web/Grand.Web.Admin/Controllers/OrderController.cs
@@ -265,7 +265,9 @@ namespace Grand.Web.Admin.Controllers
try
{
await _mediator.Send(new CancelOrderCommand() { Order = order, NotifyCustomer = true });
- await _orderViewModelService.LogEditOrder(order.Id);
+
+ _ = _orderViewModelService.LogEditOrder(order.Id);
+
Success("Successfully canceled order");
return RedirectToAction("Edit", "Order", new { id = id });
}
@@ -298,7 +300,7 @@ namespace Grand.Web.Admin.Controllers
try
{
await _orderViewModelService.SaveOrderTags(order, orderModel.OrderTags);
- await _orderViewModelService.LogEditOrder(order.Id);
+ _ = _orderViewModelService.LogEditOrder(order.Id);
var model = new OrderModel();
await _orderViewModelService.PrepareOrderDetailsModel(model, order);
return RedirectToAction("Edit", "Order", new { id = order.Id });
@@ -349,7 +351,7 @@ namespace Grand.Web.Admin.Controllers
OrderId = order.Id,
});
- await _orderViewModelService.LogEditOrder(order.Id);
+ _ = _orderViewModelService.LogEditOrder(order.Id);
model = new OrderModel();
await _orderViewModelService.PrepareOrderDetailsModel(model, order);
return RedirectToAction("Edit", "Order", new { id = id });
@@ -413,7 +415,7 @@ namespace Grand.Web.Admin.Controllers
if (ModelState.IsValid)
{
await _mediator.Send(new DeleteOrderCommand() { Order = order });
- await customerActivityService.InsertActivity("DeleteOrder", id,
+ _ = customerActivityService.InsertActivity("DeleteOrder", id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteOrder"), order.Id);
return RedirectToAction("List");
@@ -446,7 +448,7 @@ namespace Grand.Web.Admin.Controllers
if (!shipments.Any())
{
await _mediator.Send(new DeleteOrderCommand() { Order = order });
- await customerActivityService.InsertActivity("DeleteOrder", order.Id,
+ _ = customerActivityService.InsertActivity("DeleteOrder", order.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteOrder"), order.Id);
}
@@ -592,7 +594,7 @@ namespace Grand.Web.Admin.Controllers
OrderId = order.Id,
});
- await _orderViewModelService.LogEditOrder(order.Id);
+ _ = _orderViewModelService.LogEditOrder(order.Id);
await _orderViewModelService.PrepareOrderDetailsModel(model, order);
return RedirectToAction("Edit", "Order", new { id = id });
}
@@ -625,7 +627,7 @@ namespace Grand.Web.Admin.Controllers
CreatedOnUtc = DateTime.UtcNow,
OrderId = order.Id,
});
- await _orderViewModelService.LogEditOrder(order.Id);
+ _ = _orderViewModelService.LogEditOrder(order.Id);
await _orderViewModelService.PrepareOrderDetailsModel(model, order);
//selected tab
@@ -654,7 +656,7 @@ namespace Grand.Web.Admin.Controllers
order.UserFields = model.UserFields;
await _orderService.UpdateOrder(order);
- await _orderViewModelService.LogEditOrder(order.Id);
+ _ = _orderViewModelService.LogEditOrder(order.Id);
await _orderViewModelService.PrepareOrderDetailsModel(model, order);
@@ -853,7 +855,7 @@ namespace Grand.Web.Admin.Controllers
orderItem.DownloadCount = 0;
await _orderService.UpdateOrder(order);
- await _orderViewModelService.LogEditOrder(order.Id);
+ _ = _orderViewModelService.LogEditOrder(order.Id);
var model = new OrderModel();
await _orderViewModelService.PrepareOrderDetailsModel(model, order);
@@ -893,7 +895,7 @@ namespace Grand.Web.Admin.Controllers
orderItem.IsDownloadActivated = !orderItem.IsDownloadActivated;
await _orderService.UpdateOrder(order);
- await _orderViewModelService.LogEditOrder(order.Id);
+ _ = _orderViewModelService.LogEditOrder(order.Id);
var model = new OrderModel();
await _orderViewModelService.PrepareOrderDetailsModel(model, order);
@@ -968,7 +970,7 @@ namespace Grand.Web.Admin.Controllers
orderItem.LicenseDownloadId = null;
await _orderService.UpdateOrder(order);
- await _orderViewModelService.LogEditOrder(order.Id);
+ _ = _orderViewModelService.LogEditOrder(order.Id);
//success
ViewBag.RefreshPage = true;
@@ -1000,7 +1002,8 @@ namespace Grand.Web.Admin.Controllers
//attach license
orderItem.LicenseDownloadId = null;
await _orderService.UpdateOrder(order);
- await _orderViewModelService.LogEditOrder(order.Id);
+
+ _ = _orderViewModelService.LogEditOrder(order.Id);
//success
ViewBag.RefreshPage = true;
diff --git a/src/Web/Grand.Web.Admin/Controllers/PaymentController.cs b/src/Web/Grand.Web.Admin/Controllers/PaymentController.cs
index 52ff28541..1991fbd43 100644
--- a/src/Web/Grand.Web.Admin/Controllers/PaymentController.cs
+++ b/src/Web/Grand.Web.Admin/Controllers/PaymentController.cs
@@ -253,7 +253,7 @@ namespace Grand.Web.Admin.Controllers
await _settingService.SaveSetting(paymentSettings);
//activity log
- await customerActivityService.InsertActivity("EditSettings", "",
+ _ = customerActivityService.InsertActivity("EditSettings", "",
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditSettings"));
diff --git a/src/Web/Grand.Web.Admin/Controllers/ProductAttributeController.cs b/src/Web/Grand.Web.Admin/Controllers/ProductAttributeController.cs
index 7065d0f68..482d2908e 100644
--- a/src/Web/Grand.Web.Admin/Controllers/ProductAttributeController.cs
+++ b/src/Web/Grand.Web.Admin/Controllers/ProductAttributeController.cs
@@ -110,7 +110,7 @@ namespace Grand.Web.Admin.Controllers
await _productAttributeService.InsertProductAttribute(productAttribute);
//activity log
- await _customerActivityService.InsertActivity("AddNewProductAttribute", productAttribute.Id,
+ _ = _customerActivityService.InsertActivity("AddNewProductAttribute", productAttribute.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.AddNewProductAttribute"), productAttribute.Name);
@@ -161,7 +161,7 @@ namespace Grand.Web.Admin.Controllers
await _productAttributeService.UpdateProductAttribute(productAttribute);
//activity log
- await _customerActivityService.InsertActivity("EditProductAttribute", productAttribute.Id,
+ _ = _customerActivityService.InsertActivity("EditProductAttribute", productAttribute.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditProductAttribute"), productAttribute.Name);
@@ -202,7 +202,7 @@ namespace Grand.Web.Admin.Controllers
await _productAttributeService.DeleteProductAttribute(productAttribute);
//activity log
- await _customerActivityService.InsertActivity("DeleteProductAttribute", productAttribute.Id,
+ _ = _customerActivityService.InsertActivity("DeleteProductAttribute", productAttribute.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteProductAttribute"), productAttribute.Name);
diff --git a/src/Web/Grand.Web.Admin/Controllers/ProductController.cs b/src/Web/Grand.Web.Admin/Controllers/ProductController.cs
index fa31ccdbc..e6cfa1770 100644
--- a/src/Web/Grand.Web.Admin/Controllers/ProductController.cs
+++ b/src/Web/Grand.Web.Admin/Controllers/ProductController.cs
@@ -2941,7 +2941,7 @@ namespace Grand.Web.Admin.Controllers
if (string.IsNullOrEmpty(toDelete.OrderId))
{
//activity log
- await customerActivityService.InsertActivity("DeleteBid", toDelete.ProductId,
+ _ = customerActivityService.InsertActivity("DeleteBid", toDelete.ProductId,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteBid"), product.Name);
//delete bid
diff --git a/src/Web/Grand.Web.Admin/Controllers/SalesEmployeeController.cs b/src/Web/Grand.Web.Admin/Controllers/SalesEmployeeController.cs
index 4f88c6950..2638e86b1 100644
--- a/src/Web/Grand.Web.Admin/Controllers/SalesEmployeeController.cs
+++ b/src/Web/Grand.Web.Admin/Controllers/SalesEmployeeController.cs
@@ -89,7 +89,7 @@ namespace Grand.Web.Admin.Controllers
await _salesEmployeeService.UpdateSalesEmployee(salesemployee);
//activity log
- await _customerActivityService.InsertActivity("EditSalesEmployee", salesemployee.Id,
+ _ = _customerActivityService.InsertActivity("EditSalesEmployee", salesemployee.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditSalesEmployee"),
salesemployee.Name);
@@ -111,7 +111,7 @@ namespace Grand.Web.Admin.Controllers
await _salesEmployeeService.InsertSalesEmployee(salesEmployee);
//activity log
- await _customerActivityService.InsertActivity("AddNewSalesEmployee", salesEmployee.Id,
+ _ = _customerActivityService.InsertActivity("AddNewSalesEmployee", salesEmployee.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.AddNewSalesEmployee"),
salesEmployee.Name);
@@ -142,7 +142,7 @@ namespace Grand.Web.Admin.Controllers
await _salesEmployeeService.DeleteSalesEmployee(salesemployee);
//activity log
- await _customerActivityService.InsertActivity("DeleteSalesEmployee", salesemployee.Id,
+ _ = _customerActivityService.InsertActivity("DeleteSalesEmployee", salesemployee.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteSalesEmployee"),
salesemployee.Name);
diff --git a/src/Web/Grand.Web.Admin/Controllers/SettingController.cs b/src/Web/Grand.Web.Admin/Controllers/SettingController.cs
index 96594fd74..77064a99b 100644
--- a/src/Web/Grand.Web.Admin/Controllers/SettingController.cs
+++ b/src/Web/Grand.Web.Admin/Controllers/SettingController.cs
@@ -150,7 +150,7 @@ namespace Grand.Web.Admin.Controllers
await ClearCache();
//activity log
- await _customerActivityService.InsertActivity("EditSettings", "",
+ _ = _customerActivityService.InsertActivity("EditSettings", "",
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditSettings"));
@@ -183,7 +183,7 @@ namespace Grand.Web.Admin.Controllers
await ClearCache();
//activity log
- await _customerActivityService.InsertActivity("EditSettings", "",
+ _ = _customerActivityService.InsertActivity("EditSettings", "",
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditSettings"));
@@ -214,7 +214,7 @@ namespace Grand.Web.Admin.Controllers
await ClearCache();
//activity log
- await _customerActivityService.InsertActivity("EditSettings", "",
+ _ = _customerActivityService.InsertActivity("EditSettings", "",
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditSettings"));
@@ -343,7 +343,7 @@ namespace Grand.Web.Admin.Controllers
await ClearCache();
//activity log
- await _customerActivityService.InsertActivity("EditSettings", "",
+ _ = _customerActivityService.InsertActivity("EditSettings", "",
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditSettings"));
@@ -578,7 +578,7 @@ namespace Grand.Web.Admin.Controllers
await _pictureService.ClearThumbs();
//activity log
- await _customerActivityService.InsertActivity("EditSettings", "",
+ _ = _customerActivityService.InsertActivity("EditSettings", "",
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditSettings"));
@@ -600,7 +600,7 @@ namespace Grand.Web.Admin.Controllers
await SavePictureStorage(storeIdDb);
//activity log
- await _customerActivityService.InsertActivity("EditSettings", "",
+ _ = _customerActivityService.InsertActivity("EditSettings", "",
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditSettings"));
@@ -676,7 +676,7 @@ namespace Grand.Web.Admin.Controllers
await ClearCache();
//activity log
- await _customerActivityService.InsertActivity("EditSettings", "",
+ _ = _customerActivityService.InsertActivity("EditSettings", "",
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditSettings"));
@@ -822,7 +822,7 @@ namespace Grand.Web.Admin.Controllers
await ClearCache();
//activity log
- await _customerActivityService.InsertActivity("EditSettings", "",
+ _ = _customerActivityService.InsertActivity("EditSettings", "",
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditSettings"));
diff --git a/src/Web/Grand.Web.Admin/Controllers/ShipmentController.cs b/src/Web/Grand.Web.Admin/Controllers/ShipmentController.cs
index d7c4afc85..4dbb7cb42 100644
--- a/src/Web/Grand.Web.Admin/Controllers/ShipmentController.cs
+++ b/src/Web/Grand.Web.Admin/Controllers/ShipmentController.cs
@@ -245,7 +245,8 @@ namespace Grand.Web.Admin.Controllers
OrderId = order.Id,
});
- await _shipmentViewModelService.LogShipment(shipment.Id, $"A shipment #{shipment.ShipmentNumber} has been added");
+ _ = _shipmentViewModelService.LogShipment(shipment.Id, $"A shipment #{shipment.ShipmentNumber} has been added");
+
Success(_translationService.GetResource("Admin.Orders.Shipments.Added"));
return continueEditing
? RedirectToAction("ShipmentDetails", new { id = shipment.Id })
@@ -325,7 +326,7 @@ namespace Grand.Web.Admin.Controllers
OrderId = order.Id,
});
- await _shipmentViewModelService.LogShipment(shipment.Id, $"A shipment #{shipment.ShipmentNumber} has been deleted");
+ _ = _shipmentViewModelService.LogShipment(shipment.Id, $"A shipment #{shipment.ShipmentNumber} has been deleted");
Success(_translationService.GetResource("Admin.Orders.Shipments.Deleted"));
diff --git a/src/Web/Grand.Web.Admin/Controllers/ShippingController.cs b/src/Web/Grand.Web.Admin/Controllers/ShippingController.cs
index 051391023..1a2f1eb22 100644
--- a/src/Web/Grand.Web.Admin/Controllers/ShippingController.cs
+++ b/src/Web/Grand.Web.Admin/Controllers/ShippingController.cs
@@ -349,7 +349,7 @@ namespace Grand.Web.Admin.Controllers
await _settingService.SaveSetting(shippingSettings, storeScope);
//activity log
- await customerActivityService.InsertActivity("EditSettings", "",
+ _ = customerActivityService.InsertActivity("EditSettings", "",
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditSettings"));
diff --git a/src/Web/Grand.Web.Admin/Controllers/SpecificationAttributeController.cs b/src/Web/Grand.Web.Admin/Controllers/SpecificationAttributeController.cs
index 6d7a2d97d..16d61f390 100644
--- a/src/Web/Grand.Web.Admin/Controllers/SpecificationAttributeController.cs
+++ b/src/Web/Grand.Web.Admin/Controllers/SpecificationAttributeController.cs
@@ -105,7 +105,7 @@ namespace Grand.Web.Admin.Controllers
}
await _specificationAttributeService.InsertSpecificationAttribute(specificationAttribute);
//activity log
- await _customerActivityService.InsertActivity("AddNewSpecAttribute", specificationAttribute.Id,
+ _ = _customerActivityService.InsertActivity("AddNewSpecAttribute", specificationAttribute.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.AddNewSpecAttribute"), specificationAttribute.Name);
Success(_translationService.GetResource("Admin.Catalog.Attributes.SpecificationAttributes.Added"));
@@ -154,7 +154,7 @@ namespace Grand.Web.Admin.Controllers
}
await _specificationAttributeService.UpdateSpecificationAttribute(specificationAttribute);
//activity log
- await _customerActivityService.InsertActivity("EditSpecAttribute", specificationAttribute.Id,
+ _ = _customerActivityService.InsertActivity("EditSpecAttribute", specificationAttribute.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditSpecAttribute"), specificationAttribute.Name);
@@ -193,7 +193,7 @@ namespace Grand.Web.Admin.Controllers
await _specificationAttributeService.DeleteSpecificationAttribute(specificationAttribute);
//activity log
- await _customerActivityService.InsertActivity("DeleteSpecAttribute", specificationAttribute.Id,
+ _ = _customerActivityService.InsertActivity("DeleteSpecAttribute", specificationAttribute.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteSpecAttribute"), specificationAttribute.Name);
diff --git a/src/Web/Grand.Web.Admin/Controllers/TaxController.cs b/src/Web/Grand.Web.Admin/Controllers/TaxController.cs
index 623fc7eed..b3ce85447 100644
--- a/src/Web/Grand.Web.Admin/Controllers/TaxController.cs
+++ b/src/Web/Grand.Web.Admin/Controllers/TaxController.cs
@@ -194,7 +194,7 @@ namespace Grand.Web.Admin.Controllers
await ClearCache();
//activity log
- await customerActivityService.InsertActivity("EditSettings", "",
+ _ = customerActivityService.InsertActivity("EditSettings", "",
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditSettings"));
diff --git a/src/Web/Grand.Web.Admin/Services/BrandViewModelService.cs b/src/Web/Grand.Web.Admin/Services/BrandViewModelService.cs
index 852a51cee..3b515df0c 100644
--- a/src/Web/Grand.Web.Admin/Services/BrandViewModelService.cs
+++ b/src/Web/Grand.Web.Admin/Services/BrandViewModelService.cs
@@ -145,7 +145,7 @@ namespace Grand.Web.Admin.Services
await _pictureService.UpdatePictureSeoNames(brand.PictureId, brand.Name);
//activity log
- await _customerActivityService.InsertActivity("AddNewBrand", brand.Id,
+ _ = _customerActivityService.InsertActivity("AddNewBrand", brand.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.AddNewBrand"), brand.Name);
return brand;
@@ -192,7 +192,7 @@ namespace Grand.Web.Admin.Services
await _pictureService.UpdatePictureSeoNames(brand.PictureId, brand.Name);
//activity log
- await _customerActivityService.InsertActivity("EditBrand", brand.Id,
+ _ = _customerActivityService.InsertActivity("EditBrand", brand.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditBrand"), brand.Name);
return brand;
@@ -202,7 +202,7 @@ namespace Grand.Web.Admin.Services
{
await _brandService.DeleteBrand(brand);
//activity log
- await _customerActivityService.InsertActivity("DeleteBrand", brand.Id,
+ _ = _customerActivityService.InsertActivity("DeleteBrand", brand.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteBrand"), brand.Name);
}
diff --git a/src/Web/Grand.Web.Admin/Services/CategoryViewModelService.cs b/src/Web/Grand.Web.Admin/Services/CategoryViewModelService.cs
index 0be908439..4615f72b8 100644
--- a/src/Web/Grand.Web.Admin/Services/CategoryViewModelService.cs
+++ b/src/Web/Grand.Web.Admin/Services/CategoryViewModelService.cs
@@ -210,7 +210,7 @@ namespace Grand.Web.Admin.Services
await _pictureService.UpdatePictureSeoNames(category.PictureId, category.Name);
//activity log
- await _customerActivityService.InsertActivity("AddNewCategory", category.Id,
+ _ = _customerActivityService.InsertActivity("AddNewCategory", category.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.AddNewCategory"), category.Name);
@@ -259,7 +259,7 @@ namespace Grand.Web.Admin.Services
await _pictureService.UpdatePictureSeoNames(category.PictureId, category.Name);
//activity log
- await _customerActivityService.InsertActivity("EditCategory", category.Id,
+ _ = _customerActivityService.InsertActivity("EditCategory", category.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditCategory"), category.Name);
return category;
@@ -268,7 +268,7 @@ namespace Grand.Web.Admin.Services
{
await _categoryService.DeleteCategory(category);
//activity log
- await _customerActivityService.InsertActivity("DeleteCategory", category.Id,
+ _ = _customerActivityService.InsertActivity("DeleteCategory", category.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteCategory"), category.Name);
}
diff --git a/src/Web/Grand.Web.Admin/Services/CheckoutAttributeViewModelService.cs b/src/Web/Grand.Web.Admin/Services/CheckoutAttributeViewModelService.cs
index 20a3d1c7b..02f3e5c75 100644
--- a/src/Web/Grand.Web.Admin/Services/CheckoutAttributeViewModelService.cs
+++ b/src/Web/Grand.Web.Admin/Services/CheckoutAttributeViewModelService.cs
@@ -232,7 +232,7 @@ namespace Grand.Web.Admin.Services
await _checkoutAttributeService.InsertCheckoutAttribute(checkoutAttribute);
//activity log
- await _customerActivityService.InsertActivity("AddNewCheckoutAttribute", checkoutAttribute.Id,
+ _ = _customerActivityService.InsertActivity("AddNewCheckoutAttribute", checkoutAttribute.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.AddNewCheckoutAttribute"), checkoutAttribute.Name);
return checkoutAttribute;
@@ -244,7 +244,7 @@ namespace Grand.Web.Admin.Services
await _checkoutAttributeService.UpdateCheckoutAttribute(checkoutAttribute);
//activity log
- await _customerActivityService.InsertActivity("EditCheckoutAttribute", checkoutAttribute.Id,
+ _ = _customerActivityService.InsertActivity("EditCheckoutAttribute", checkoutAttribute.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditCheckoutAttribute"), checkoutAttribute.Name);
return checkoutAttribute;
diff --git a/src/Web/Grand.Web.Admin/Services/CollectionViewModelService.cs b/src/Web/Grand.Web.Admin/Services/CollectionViewModelService.cs
index 93fddafaa..ac71e5aae 100644
--- a/src/Web/Grand.Web.Admin/Services/CollectionViewModelService.cs
+++ b/src/Web/Grand.Web.Admin/Services/CollectionViewModelService.cs
@@ -159,7 +159,7 @@ namespace Grand.Web.Admin.Services
await _pictureService.UpdatePictureSeoNames(collection.PictureId, collection.Name);
//activity log
- await _customerActivityService.InsertActivity("AddNewCollection", collection.Id,
+ _ = _customerActivityService.InsertActivity("AddNewCollection", collection.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.AddNewCollection"), collection.Name);
return collection;
@@ -206,7 +206,7 @@ namespace Grand.Web.Admin.Services
await _pictureService.UpdatePictureSeoNames(collection.PictureId, collection.Name);
//activity log
- await _customerActivityService.InsertActivity("EditCollection", collection.Id,
+ _ = _customerActivityService.InsertActivity("EditCollection", collection.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditCollection"), collection.Name);
return collection;
@@ -216,7 +216,7 @@ namespace Grand.Web.Admin.Services
{
await _collectionService.DeleteCollection(collection);
//activity log
- await _customerActivityService.InsertActivity("DeleteCollection", collection.Id,
+ _ = _customerActivityService.InsertActivity("DeleteCollection", collection.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteCollection"), collection.Name);
}
diff --git a/src/Web/Grand.Web.Admin/Services/ContactAttributeViewModelService.cs b/src/Web/Grand.Web.Admin/Services/ContactAttributeViewModelService.cs
index 6380d4c67..6d85668f0 100644
--- a/src/Web/Grand.Web.Admin/Services/ContactAttributeViewModelService.cs
+++ b/src/Web/Grand.Web.Admin/Services/ContactAttributeViewModelService.cs
@@ -152,7 +152,7 @@ namespace Grand.Web.Admin.Services
await _contactAttributeService.InsertContactAttribute(contactAttribute);
//activity log
- await _customerActivityService.InsertActivity("AddNewContactAttribute", contactAttribute.Id,
+ _ = _customerActivityService.InsertActivity("AddNewContactAttribute", contactAttribute.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.AddNewContactAttribute"), contactAttribute.Name);
return contactAttribute;
@@ -164,7 +164,7 @@ namespace Grand.Web.Admin.Services
await _contactAttributeService.UpdateContactAttribute(contactAttribute);
//activity log
- await _customerActivityService.InsertActivity("EditContactAttribute", contactAttribute.Id,
+ _ = _customerActivityService.InsertActivity("EditContactAttribute", contactAttribute.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditContactAttribute"), contactAttribute.Name);
return contactAttribute;
diff --git a/src/Web/Grand.Web.Admin/Services/CourseViewModelService.cs b/src/Web/Grand.Web.Admin/Services/CourseViewModelService.cs
index 1553035d4..f174cb547 100644
--- a/src/Web/Grand.Web.Admin/Services/CourseViewModelService.cs
+++ b/src/Web/Grand.Web.Admin/Services/CourseViewModelService.cs
@@ -128,7 +128,7 @@ namespace Grand.Web.Admin.Services
//activity log
- await _customerActivityService.InsertActivity("AddNewCourse", course.Id,
+ _ = _customerActivityService.InsertActivity("AddNewCourse", course.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.AddNewCourse"), course.Name);
@@ -168,7 +168,7 @@ namespace Grand.Web.Admin.Services
await _productCourseService.UpdateCourseOnProduct(course.ProductId, course.Id);
//activity log
- await _customerActivityService.InsertActivity("EditCourse", course.Id,
+ _ = _customerActivityService.InsertActivity("EditCourse", course.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditCourse"), course.Name);
@@ -178,7 +178,7 @@ namespace Grand.Web.Admin.Services
{
await _courseService.Delete(course);
//activity log
- await _customerActivityService.InsertActivity("DeleteCourse", course.Id,
+ _ = _customerActivityService.InsertActivity("DeleteCourse", course.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteCourse"), course.Name);
}
@@ -209,7 +209,7 @@ namespace Grand.Web.Admin.Services
var lesson = model.ToEntity();
await _courseLessonService.Insert(lesson);
//activity log
- await _customerActivityService.InsertActivity("AddNewCourseLesson", lesson.Id,
+ _ = _customerActivityService.InsertActivity("AddNewCourseLesson", lesson.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.AddNewCourseLesson"), lesson.Name);
return lesson;
@@ -249,7 +249,7 @@ namespace Grand.Web.Admin.Services
}
//activity log
- await _customerActivityService.InsertActivity("EditCourseLesson", lesson.Id,
+ _ = _customerActivityService.InsertActivity("EditCourseLesson", lesson.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditLessonCourse"), lesson.Name);
@@ -274,7 +274,7 @@ namespace Grand.Web.Admin.Services
}
//activity log
- await _customerActivityService.InsertActivity("DeleteCourseLesson", lesson.Id,
+ _ = _customerActivityService.InsertActivity("DeleteCourseLesson", lesson.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteCourseLesson"), lesson.Name);
}
diff --git a/src/Web/Grand.Web.Admin/Services/CustomerActionViewModelService.cs b/src/Web/Grand.Web.Admin/Services/CustomerActionViewModelService.cs
index ec9f91eda..33d96f5f8 100644
--- a/src/Web/Grand.Web.Admin/Services/CustomerActionViewModelService.cs
+++ b/src/Web/Grand.Web.Admin/Services/CustomerActionViewModelService.cs
@@ -166,7 +166,7 @@ namespace Grand.Web.Admin.Services
{
var customeraction = model.ToEntity(_dateTimeService);
await _customerActionService.InsertCustomerAction(customeraction);
- await _customerActivityService.InsertActivity("AddNewCustomerAction", customeraction.Id,
+ _ = _customerActivityService.InsertActivity("AddNewCustomerAction", customeraction.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.AddNewCustomerAction"), customeraction.Name);
return customeraction;
@@ -180,7 +180,7 @@ namespace Grand.Web.Admin.Services
customeraction = model.ToEntity(customeraction, _dateTimeService);
await _customerActionService.UpdateCustomerAction(customeraction);
- await _customerActivityService.InsertActivity("EditCustomerAction", customeraction.Id,
+ _ = _customerActivityService.InsertActivity("EditCustomerAction", customeraction.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditCustomerAction"), customeraction.Name);
return customeraction;
@@ -221,7 +221,7 @@ namespace Grand.Web.Admin.Services
customerAction.Conditions.Add(condition);
await _customerActionService.UpdateCustomerAction(customerAction);
- await _customerActivityService.InsertActivity("AddNewCustomerActionCondition", customerAction.Id,
+ _ = _customerActivityService.InsertActivity("AddNewCustomerActionCondition", customerAction.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.AddNewCustomerAction"), customerAction.Name);
return (customerAction.Id, condition.Id);
@@ -232,7 +232,7 @@ namespace Grand.Web.Admin.Services
condition = model.ToEntity(condition);
await _customerActionService.UpdateCustomerAction(customeraction);
//activity log
- await _customerActivityService.InsertActivity("EditCustomerActionCondition", customeraction.Id,
+ _ = _customerActivityService.InsertActivity("EditCustomerActionCondition", customeraction.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditCustomerActionCondition"), customeraction.Name);
return customeraction;
diff --git a/src/Web/Grand.Web.Admin/Services/CustomerGroupViewModelService.cs b/src/Web/Grand.Web.Admin/Services/CustomerGroupViewModelService.cs
index 1ffa01cd3..2b6a60581 100644
--- a/src/Web/Grand.Web.Admin/Services/CustomerGroupViewModelService.cs
+++ b/src/Web/Grand.Web.Admin/Services/CustomerGroupViewModelService.cs
@@ -80,7 +80,7 @@ namespace Grand.Web.Admin.Services
var customerGroup = model.ToEntity();
await _groupService.InsertCustomerGroup(customerGroup);
//activity log
- await _customerActivityService.InsertActivity("AddNewCustomerGroup", customerGroup.Id,
+ _ = _customerActivityService.InsertActivity("AddNewCustomerGroup", customerGroup.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.AddNewCustomerGroup"), customerGroup.Name);
return customerGroup;
@@ -91,7 +91,7 @@ namespace Grand.Web.Admin.Services
await _groupService.UpdateCustomerGroup(customerGroup);
//activity log
- await _customerActivityService.InsertActivity("EditCustomerGroup", customerGroup.Id,
+ _ = _customerActivityService.InsertActivity("EditCustomerGroup", customerGroup.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditCustomerGroup"), customerGroup.Name);
return customerGroup;
@@ -101,7 +101,7 @@ namespace Grand.Web.Admin.Services
await _groupService.DeleteCustomerGroup(customerGroup);
//activity log
- await _customerActivityService.InsertActivity("DeleteCustomerGroup", customerGroup.Id,
+ _ = _customerActivityService.InsertActivity("DeleteCustomerGroup", customerGroup.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteCustomerGroup"), customerGroup.Name);
}
diff --git a/src/Web/Grand.Web.Admin/Services/CustomerReminderViewModelService.cs b/src/Web/Grand.Web.Admin/Services/CustomerReminderViewModelService.cs
index b2154f21e..66cc58bcc 100644
--- a/src/Web/Grand.Web.Admin/Services/CustomerReminderViewModelService.cs
+++ b/src/Web/Grand.Web.Admin/Services/CustomerReminderViewModelService.cs
@@ -79,7 +79,7 @@ namespace Grand.Web.Admin.Services
var customerreminder = model.ToEntity(_dateTimeService);
await _customerReminderService.InsertCustomerReminder(customerreminder);
//activity log
- await _customerActivityService.InsertActivity("AddNewCustomerReminder", customerreminder.Id,
+ _ = _customerActivityService.InsertActivity("AddNewCustomerReminder", customerreminder.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.AddNewCustomerReminder"), customerreminder.Name);
return customerreminder;
@@ -93,7 +93,7 @@ namespace Grand.Web.Admin.Services
customerReminder = model.ToEntity(customerReminder, _dateTimeService);
await _customerReminderService.UpdateCustomerReminder(customerReminder);
- await _customerActivityService.InsertActivity("EditCustomerReminder", customerReminder.Id,
+ _ = _customerActivityService.InsertActivity("EditCustomerReminder", customerReminder.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditCustomerReminder"), customerReminder.Name);
return customerReminder;
@@ -117,7 +117,7 @@ namespace Grand.Web.Admin.Services
}
public virtual async Task DeleteCustomerReminder(CustomerReminder customerReminder)
{
- await _customerActivityService.InsertActivity("DeleteCustomerReminder", customerReminder.Id,
+ _ = _customerActivityService.InsertActivity("DeleteCustomerReminder", customerReminder.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteCustomerReminder"), customerReminder.Name);
await _customerReminderService.DeleteCustomerReminder(customerReminder);
@@ -173,7 +173,7 @@ namespace Grand.Web.Admin.Services
customerReminder.Conditions.Add(condition);
await _customerReminderService.UpdateCustomerReminder(customerReminder);
- await _customerActivityService.InsertActivity("AddNewCustomerReminderCondition", customerReminder.Id,
+ _ = _customerActivityService.InsertActivity("AddNewCustomerReminderCondition", customerReminder.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.AddNewCustomerReminder"), customerReminder.Name);
@@ -197,7 +197,7 @@ namespace Grand.Web.Admin.Services
{
condition = model.ToEntity(condition);
await _customerReminderService.UpdateCustomerReminder(customerReminder);
- await _customerActivityService.InsertActivity("EditCustomerReminderCondition", customerReminder.Id,
+ _ = _customerActivityService.InsertActivity("EditCustomerReminderCondition", customerReminder.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditCustomerReminderCondition"), customerReminder.Name);
return condition;
@@ -443,7 +443,7 @@ namespace Grand.Web.Admin.Services
customerReminder.Levels.Add(level);
await _customerReminderService.UpdateCustomerReminder(customerReminder);
- await _customerActivityService.InsertActivity("AddNewCustomerReminderLevel", customerReminder.Id,
+ _ = _customerActivityService.InsertActivity("AddNewCustomerReminderLevel", customerReminder.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.AddNewCustomerReminderLevel"), customerReminder.Name);
return level;
@@ -460,7 +460,7 @@ namespace Grand.Web.Admin.Services
customerReminderLevel.Hour = model.Hour;
customerReminderLevel.Minutes = model.Minutes;
await _customerReminderService.UpdateCustomerReminder(customerReminder);
- await _customerActivityService.InsertActivity("EditCustomerReminderCondition", customerReminder.Id,
+ _ = _customerActivityService.InsertActivity("EditCustomerReminderCondition", customerReminder.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditCustomerReminderLevel"), customerReminder.Name);
return customerReminderLevel;
diff --git a/src/Web/Grand.Web.Admin/Services/CustomerTagViewModelService.cs b/src/Web/Grand.Web.Admin/Services/CustomerTagViewModelService.cs
index ea1c0b595..00fcc9555 100644
--- a/src/Web/Grand.Web.Admin/Services/CustomerTagViewModelService.cs
+++ b/src/Web/Grand.Web.Admin/Services/CustomerTagViewModelService.cs
@@ -75,7 +75,7 @@ namespace Grand.Web.Admin.Services
await _customerTagService.InsertCustomerTag(customertag);
//activity log
- await _customerActivityService.InsertActivity("AddNewCustomerTag", customertag.Id,
+ _ = _customerActivityService.InsertActivity("AddNewCustomerTag", customertag.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.AddNewCustomerTag"), customertag.Name);
return customertag;
@@ -88,7 +88,7 @@ namespace Grand.Web.Admin.Services
await _customerTagService.UpdateCustomerTag(customerTag);
//activity log
- await _customerActivityService.InsertActivity("EditCustomerTage", customerTag.Id,
+ _ = _customerActivityService.InsertActivity("EditCustomerTage", customerTag.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditCustomerTag"), customerTag.Name);
return customerTag;
@@ -96,7 +96,7 @@ namespace Grand.Web.Admin.Services
public virtual async Task DeleteCustomerTag(CustomerTag customerTag)
{
//activity log
- await _customerActivityService.InsertActivity("DeleteCustomerTag", customerTag.Id,
+ _ = _customerActivityService.InsertActivity("DeleteCustomerTag", customerTag.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteCustomerTag"), customerTag.Name);
await _customerTagService.DeleteCustomerTag(customerTag);
diff --git a/src/Web/Grand.Web.Admin/Services/CustomerViewModelService.cs b/src/Web/Grand.Web.Admin/Services/CustomerViewModelService.cs
index 78c37f393..a36ff8d22 100644
--- a/src/Web/Grand.Web.Admin/Services/CustomerViewModelService.cs
+++ b/src/Web/Grand.Web.Admin/Services/CustomerViewModelService.cs
@@ -799,7 +799,7 @@ namespace Grand.Web.Admin.Services
await SaveCustomerTags(customer, ParseCustomerTags(model.CustomerTags));
//activity log
- await _customerActivityService.InsertActivity("AddNewCustomer", customer.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.AddNewCustomer"), customer.Id);
+ _ = _customerActivityService.InsertActivity("AddNewCustomer", customer.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.AddNewCustomer"), customer.Id);
return customer;
}
@@ -1020,7 +1020,7 @@ namespace Grand.Web.Admin.Services
await SaveCustomerTags(customer, ParseCustomerTags(model.CustomerTags));
//activity log
- await _customerActivityService.InsertActivity("EditCustomer", customer.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.EditCustomer"), customer.Id);
+ _ = _customerActivityService.InsertActivity("EditCustomer", customer.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.EditCustomer"), customer.Id);
return customer;
}
@@ -1037,7 +1037,7 @@ namespace Grand.Web.Admin.Services
}
//activity log
- await _customerActivityService.InsertActivity("DeleteCustomer", customer.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.DeleteCustomer"), customer.Id);
+ _ = _customerActivityService.InsertActivity("DeleteCustomer", customer.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.DeleteCustomer"), customer.Id);
}
public virtual async Task DeleteSelected(IList<string> selectedIds)
@@ -1052,7 +1052,7 @@ namespace Grand.Web.Admin.Services
await _customerService.DeleteCustomer(customer);
}
//activity log
- await _customerActivityService.InsertActivity("DeleteCustomer", customer.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.DeleteCustomer"), customer.Id);
+ _ = _customerActivityService.InsertActivity("DeleteCustomer", customer.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.DeleteCustomer"), customer.Id);
}
}
@@ -1082,7 +1082,7 @@ namespace Grand.Web.Admin.Services
null : (DateTime?)_dateTimeService.ConvertToUtcTime(model.DontSendBeforeDate.Value)
};
await queuedEmailService.InsertQueuedEmail(email);
- await _customerActivityService.InsertActivity("CustomerAdmin.SendEmail", "", customer, "", _translationService.GetResource("ActivityLog.SendEmailfromAdminPanel"), model.Subject);
+ _ = _customerActivityService.InsertActivity("CustomerAdmin.SendEmail", "", customer, "", _translationService.GetResource("ActivityLog.SendEmailfromAdminPanel"), model.Subject);
}
public virtual async Task<IEnumerable<CustomerModel.LoyaltyPointsHistoryModel>> PrepareLoyaltyPointsHistoryModel(string customerId)
@@ -1105,7 +1105,7 @@ namespace Grand.Web.Admin.Services
public virtual async Task<LoyaltyPointsHistory> InsertLoyaltyPointsHistory(Customer customer, string storeId, int addLoyaltyPointsValue, string addLoyaltyPointsMessage)
{
//activity log
- await _customerActivityService.InsertActivity("AddLoyaltyPoints", customer.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.AddNewLoyaltyPoints"), customer.Email, addLoyaltyPointsValue);
+ _ = _customerActivityService.InsertActivity("AddLoyaltyPoints", customer.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.AddNewLoyaltyPoints"), customer.Email, addLoyaltyPointsValue);
return await _loyaltyPointsService.AddLoyaltyPointsHistory(customer.Id, addLoyaltyPointsValue, storeId, addLoyaltyPointsMessage);
}
@@ -1281,7 +1281,7 @@ namespace Grand.Web.Admin.Services
if (cart != null)
{
//activity log
- await _customerActivityService.InsertActivity("CustomerAdmin.UpdateCartCustomer", customer.Id,_workContext.CurrentCustomer,"",
+ _ = _customerActivityService.InsertActivity("CustomerAdmin.UpdateCartCustomer", customer.Id,_workContext.CurrentCustomer,"",
_translationService.GetResource("ActivityLog.UpdateCartCustomer"), customer.Email, customer.Id, unitprice);
return await _serviceProvider.GetRequiredService<IShoppingCartService>()
diff --git a/src/Web/Grand.Web.Admin/Services/DiscountViewModelService.cs b/src/Web/Grand.Web.Admin/Services/DiscountViewModelService.cs
index 9760b8ae0..a66c19bcd 100644
--- a/src/Web/Grand.Web.Admin/Services/DiscountViewModelService.cs
+++ b/src/Web/Grand.Web.Admin/Services/DiscountViewModelService.cs
@@ -166,7 +166,7 @@ namespace Grand.Web.Admin.Services
await _discountService.InsertDiscount(discount);
//activity log
- await _customerActivityService.InsertActivity("AddNewDiscount", discount.Id,
+ _ = _customerActivityService.InsertActivity("AddNewDiscount", discount.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.AddNewDiscount"), discount.Name);
return discount;
@@ -219,7 +219,7 @@ namespace Grand.Web.Admin.Services
}
//activity log
- await _customerActivityService.InsertActivity("EditDiscount", discount.Id,
+ _ = _customerActivityService.InsertActivity("EditDiscount", discount.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditDiscount"), discount.Name);
return discount;
@@ -229,7 +229,7 @@ namespace Grand.Web.Admin.Services
{
await _discountService.DeleteDiscount(discount);
//activity log
- await _customerActivityService.InsertActivity("DeleteDiscount", discount.Id,
+ _ = _customerActivityService.InsertActivity("DeleteDiscount", discount.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteDiscount"), discount.Name);
}
diff --git a/src/Web/Grand.Web.Admin/Services/DocumentViewModelService.cs b/src/Web/Grand.Web.Admin/Services/DocumentViewModelService.cs
index 5e87e63e5..8c0c0ebd8 100644
--- a/src/Web/Grand.Web.Admin/Services/DocumentViewModelService.cs
+++ b/src/Web/Grand.Web.Admin/Services/DocumentViewModelService.cs
@@ -232,7 +232,7 @@ namespace Grand.Web.Admin.Services
await _documentService.Insert(document);
//activity log
- await _customerActivityService.InsertActivity("AddNewDocument", document.Id,
+ _ = _customerActivityService.InsertActivity("AddNewDocument", document.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.AddNewDocument"), document.Name);
@@ -259,7 +259,7 @@ namespace Grand.Web.Admin.Services
}
//activity log
- await _customerActivityService.InsertActivity("EditDocument", document.Id,
+ _ = _customerActivityService.InsertActivity("EditDocument", document.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditDocument"), document.Name);
@@ -279,7 +279,7 @@ namespace Grand.Web.Admin.Services
}
//activity log
- await _customerActivityService.InsertActivity("DeleteDocument", document.Id,
+ _ = _customerActivityService.InsertActivity("DeleteDocument", document.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteDocument"), document.Name);
diff --git a/src/Web/Grand.Web.Admin/Services/GiftVoucherViewModelService.cs b/src/Web/Grand.Web.Admin/Services/GiftVoucherViewModelService.cs
index 13ee428b5..33132bb04 100644
--- a/src/Web/Grand.Web.Admin/Services/GiftVoucherViewModelService.cs
+++ b/src/Web/Grand.Web.Admin/Services/GiftVoucherViewModelService.cs
@@ -138,7 +138,7 @@ namespace Grand.Web.Admin.Services
await _giftVoucherService.InsertGiftVoucher(giftVoucher);
//activity log
- await _customerActivityService.InsertActivity("AddNewGiftVoucher", giftVoucher.Id,
+ _ = _customerActivityService.InsertActivity("AddNewGiftVoucher", giftVoucher.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.AddNewGiftVoucher"), giftVoucher.Code);
return giftVoucher;
@@ -192,7 +192,7 @@ namespace Grand.Web.Admin.Services
giftVoucher = model.ToEntity(giftVoucher, _dateTimeService);
await _giftVoucherService.UpdateGiftVoucher(giftVoucher);
//activity log
- await _customerActivityService.InsertActivity("EditGiftVoucher", giftVoucher.Id,
+ _ = _customerActivityService.InsertActivity("EditGiftVoucher", giftVoucher.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditGiftVoucher"), giftVoucher.Code);
@@ -202,7 +202,7 @@ namespace Grand.Web.Admin.Services
{
await _giftVoucherService.DeleteGiftVoucher(giftVoucher);
//activity log
- await _customerActivityService.InsertActivity("DeleteGiftVoucher", giftVoucher.Id,
+ _ = _customerActivityService.InsertActivity("DeleteGiftVoucher", giftVoucher.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteGiftVoucher"), giftVoucher.Code);
}
diff --git a/src/Web/Grand.Web.Admin/Services/KnowledgebaseViewModelService.cs b/src/Web/Grand.Web.Admin/Services/KnowledgebaseViewModelService.cs
index 36dfabedc..07f9ba8be 100644
--- a/src/Web/Grand.Web.Admin/Services/KnowledgebaseViewModelService.cs
+++ b/src/Web/Grand.Web.Admin/Services/KnowledgebaseViewModelService.cs
@@ -201,7 +201,7 @@ namespace Grand.Web.Admin.Services
knowledgebaseCategory.SeName = model.SeName;
await _knowledgebaseService.InsertKnowledgebaseCategory(knowledgebaseCategory);
await _slugService.SaveSlug(knowledgebaseCategory, model.SeName, "");
- await _customerActivityService.InsertActivity("CreateKnowledgebaseCategory", knowledgebaseCategory.Id,
+ _ = _customerActivityService.InsertActivity("CreateKnowledgebaseCategory", knowledgebaseCategory.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.CreateKnowledgebaseCategory"), knowledgebaseCategory.Name);
@@ -216,7 +216,7 @@ namespace Grand.Web.Admin.Services
knowledgebaseCategory.SeName = model.SeName;
await _knowledgebaseService.UpdateKnowledgebaseCategory(knowledgebaseCategory);
await _slugService.SaveSlug(knowledgebaseCategory, model.SeName, "");
- await _customerActivityService.InsertActivity("UpdateKnowledgebaseCategory", knowledgebaseCategory.Id,
+ _ = _customerActivityService.InsertActivity("UpdateKnowledgebaseCategory", knowledgebaseCategory.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.UpdateKnowledgebaseCategory"), knowledgebaseCategory.Name);
@@ -225,7 +225,7 @@ namespace Grand.Web.Admin.Services
public virtual async Task DeleteKnowledgebaseCategoryModel(KnowledgebaseCategory knowledgebaseCategory)
{
await _knowledgebaseService.DeleteKnowledgebaseCategory(knowledgebaseCategory);
- await _customerActivityService.InsertActivity("DeleteKnowledgebaseCategory", knowledgebaseCategory.Id,
+ _ = _customerActivityService.InsertActivity("DeleteKnowledgebaseCategory", knowledgebaseCategory.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteKnowledgebaseCategory"), knowledgebaseCategory.Name);
}
@@ -250,7 +250,7 @@ namespace Grand.Web.Admin.Services
knowledgebaseArticle.AllowComments = model.AllowComments;
await _knowledgebaseService.InsertKnowledgebaseArticle(knowledgebaseArticle);
await _slugService.SaveSlug(knowledgebaseArticle, model.SeName, "");
- await _customerActivityService.InsertActivity("CreateKnowledgebaseArticle", knowledgebaseArticle.Id,
+ _ = _customerActivityService.InsertActivity("CreateKnowledgebaseArticle", knowledgebaseArticle.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.CreateKnowledgebaseArticle"), knowledgebaseArticle.Name);
@@ -266,7 +266,7 @@ namespace Grand.Web.Admin.Services
knowledgebaseArticle.AllowComments = model.AllowComments;
await _knowledgebaseService.UpdateKnowledgebaseArticle(knowledgebaseArticle);
await _slugService.SaveSlug(knowledgebaseArticle, model.SeName, "");
- await _customerActivityService.InsertActivity("UpdateKnowledgebaseArticle", knowledgebaseArticle.Id,
+ _ = _customerActivityService.InsertActivity("UpdateKnowledgebaseArticle", knowledgebaseArticle.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.UpdateKnowledgebaseArticle"), knowledgebaseArticle.Name);
@@ -275,7 +275,7 @@ namespace Grand.Web.Admin.Services
public virtual async Task DeleteKnowledgebaseArticle(KnowledgebaseArticle knowledgebaseArticle)
{
await _knowledgebaseService.DeleteKnowledgebaseArticle(knowledgebaseArticle);
- await _customerActivityService.InsertActivity("DeleteKnowledgebaseArticle", knowledgebaseArticle.Id,
+ _ = _customerActivityService.InsertActivity("DeleteKnowledgebaseArticle", knowledgebaseArticle.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteKnowledgebaseArticle"), knowledgebaseArticle.Name);
}
diff --git a/src/Web/Grand.Web.Admin/Services/MerchandiseReturnViewModelService.cs b/src/Web/Grand.Web.Admin/Services/MerchandiseReturnViewModelService.cs
index 7375c4455..f6ac27384 100644
--- a/src/Web/Grand.Web.Admin/Services/MerchandiseReturnViewModelService.cs
+++ b/src/Web/Grand.Web.Admin/Services/MerchandiseReturnViewModelService.cs
@@ -292,7 +292,7 @@ namespace Grand.Web.Admin.Services
merchandiseReturn.NotifyCustomer = model.NotifyCustomer;
await _merchandiseReturnService.UpdateMerchandiseReturn(merchandiseReturn);
//activity log
- await _customerActivityService.InsertActivity("EditMerchandiseReturn", merchandiseReturn.Id,
+ _ = _customerActivityService.InsertActivity("EditMerchandiseReturn", merchandiseReturn.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditMerchandiseReturn"), merchandiseReturn.Id);
@@ -304,7 +304,7 @@ namespace Grand.Web.Admin.Services
{
await _merchandiseReturnService.DeleteMerchandiseReturn(merchandiseReturn);
//activity log
- await _customerActivityService.InsertActivity("DeleteMerchandiseReturn", merchandiseReturn.Id,
+ _ = _customerActivityService.InsertActivity("DeleteMerchandiseReturn", merchandiseReturn.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteMerchandiseReturn"), merchandiseReturn.Id);
}
diff --git a/src/Web/Grand.Web.Admin/Services/OrderViewModelService.cs b/src/Web/Grand.Web.Admin/Services/OrderViewModelService.cs
index a5ed72a90..10e680a3a 100644
--- a/src/Web/Grand.Web.Admin/Services/OrderViewModelService.cs
+++ b/src/Web/Grand.Web.Admin/Services/OrderViewModelService.cs
@@ -1003,12 +1003,13 @@ namespace Grand.Web.Admin.Services
}
}
- public virtual async Task LogEditOrder(string orderId)
+ public virtual Task LogEditOrder(string orderId)
{
var httpContextAccessor = _serviceProvider.GetRequiredService<IHttpContextAccessor>();
- await _customerActivityService.InsertActivity("EditOrder", orderId,
+ _ = _customerActivityService.InsertActivity("EditOrder", orderId,
_workContext.CurrentCustomer, httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditOrder"), orderId);
+ return Task.CompletedTask;
}
public virtual async Task<Address> UpdateOrderAddress(Order order, Address address, OrderAddressModel model, List<CustomAttribute> customAttributes)
{
@@ -1024,7 +1025,7 @@ namespace Grand.Web.Admin.Services
CreatedOnUtc = DateTime.UtcNow,
OrderId = order.Id,
});
- await LogEditOrder(order.Id);
+ _ = LogEditOrder(order.Id);
return address;
}
public virtual async Task<IList<string>> AddProductToOrderDetails(string orderId, string productId, IFormCollection form)
@@ -1244,7 +1245,7 @@ namespace Grand.Web.Admin.Services
await _mediator.Send(new InsertOrderItemCommand() { Order = order, OrderItem = orderItem, Product = product });
- await LogEditOrder(order.Id);
+ _ = LogEditOrder(order.Id);
}
return warnings;
diff --git a/src/Web/Grand.Web.Admin/Services/PageViewModelService.cs b/src/Web/Grand.Web.Admin/Services/PageViewModelService.cs
index 7be14111f..a5b1f2083 100644
--- a/src/Web/Grand.Web.Admin/Services/PageViewModelService.cs
+++ b/src/Web/Grand.Web.Admin/Services/PageViewModelService.cs
@@ -100,7 +100,7 @@ namespace Grand.Web.Admin.Services
await _slugService.SaveSlug(page, model.SeName, "");
//activity log
- await _customerActivityService.InsertActivity("AddNewPage", page.Id,
+ _ = _customerActivityService.InsertActivity("AddNewPage", page.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.AddNewPage"), page.Title ?? page.SystemName);
return page;
@@ -120,7 +120,7 @@ namespace Grand.Web.Admin.Services
//search engine name
await _slugService.SaveSlug(page, model.SeName, "");
//activity log
- await _customerActivityService.InsertActivity("EditPage", page.Id,
+ _ = _customerActivityService.InsertActivity("EditPage", page.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditPage"), page.Title ?? page.SystemName);
@@ -130,7 +130,7 @@ namespace Grand.Web.Admin.Services
{
await _pageService.DeletePage(page);
//activity log
- await _customerActivityService.InsertActivity("DeletePage", page.Id,
+ _ = _customerActivityService.InsertActivity("DeletePage", page.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeletePage"), page.Title ?? page.SystemName);
}
diff --git a/src/Web/Grand.Web.Admin/Services/ProductViewModelService.cs b/src/Web/Grand.Web.Admin/Services/ProductViewModelService.cs
index 6ea7eb7cd..0f020754c 100644
--- a/src/Web/Grand.Web.Admin/Services/ProductViewModelService.cs
+++ b/src/Web/Grand.Web.Admin/Services/ProductViewModelService.cs
@@ -945,7 +945,7 @@ namespace Grand.Web.Admin.Services
await _productService.UpdateProduct(product);
//activity log
- await _customerActivityService.InsertActivity("AddNewProduct", product.Id,
+ _ = _customerActivityService.InsertActivity("AddNewProduct", product.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.AddNewProduct"), product.Name);
@@ -1044,7 +1044,7 @@ namespace Grand.Web.Admin.Services
await _downloadService.DeleteDownload(prevSampleDownload);
}
//activity log
- await _customerActivityService.InsertActivity("EditProduct", product.Id,
+ _ = _customerActivityService.InsertActivity("EditProduct", product.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.EditProduct"), product.Name);
return product;
@@ -1068,7 +1068,7 @@ namespace Grand.Web.Admin.Services
await _downloadService.DeleteDownload(sampledownload);
}
//activity log
- await _customerActivityService.InsertActivity("DeleteProduct", product.Id,
+ _ = _customerActivityService.InsertActivity("DeleteProduct", product.Id,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.DeleteProduct"), product.Name);
}
diff --git a/src/Web/Grand.Web.Admin/Services/ShipmentViewModelService.cs b/src/Web/Grand.Web.Admin/Services/ShipmentViewModelService.cs
index f079d512b..7f674cf1e 100644
--- a/src/Web/Grand.Web.Admin/Services/ShipmentViewModelService.cs
+++ b/src/Web/Grand.Web.Admin/Services/ShipmentViewModelService.cs
@@ -293,10 +293,11 @@ namespace Grand.Web.Admin.Services
}
}
- public virtual async Task LogShipment(string shipmentId, string message)
+ public virtual Task LogShipment(string shipmentId, string message)
{
- await _customerActivityService.InsertActivity("EditShipment", shipmentId,
+ _ = _customerActivityService.InsertActivity("EditShipment", shipmentId,
_workContext.CurrentCustomer, _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(), message);
+ return Task.CompletedTask;
}
public virtual async Task<(IEnumerable<Shipment> shipments, int totalCount)> PrepareShipments(ShipmentListModel model, int pageIndex, int pageSize)
{
diff --git a/src/Web/Grand.Web.Common/Filters/CustomerActivityAttribute.cs b/src/Web/Grand.Web.Common/Filters/CustomerActivityAttribute.cs
index 500f62cfa..28523e4ba 100644
--- a/src/Web/Grand.Web.Common/Filters/CustomerActivityAttribute.cs
+++ b/src/Web/Grand.Web.Common/Filters/CustomerActivityAttribute.cs
@@ -133,7 +133,7 @@ namespace Grand.Web.Common.Filters
if (!_workContext.CurrentCustomer.IsSearchEngineAccount())
{
//activity
- await _customerActivityService.InsertActivity("PublicStore.Url", pageUrl, _workContext.CurrentCustomer,
+ _ = _customerActivityService.InsertActivity("PublicStore.Url", pageUrl, _workContext.CurrentCustomer,
context.HttpContext?.Connection?.RemoteIpAddress?.ToString(), pageUrl);
//action
await _customerActionEventService.Url(_workContext.CurrentCustomer, context.HttpContext?.Request?.Path.ToString(), context.HttpContext?.Request?.Headers["Referer"]);
diff --git a/src/Web/Grand.Web/Commands/Handler/Blogs/InsertBlogCommentCommandHandler.cs b/src/Web/Grand.Web/Commands/Handler/Blogs/InsertBlogCommentCommandHandler.cs
index 414d9db48..08b40bded 100644
--- a/src/Web/Grand.Web/Commands/Handler/Blogs/InsertBlogCommentCommandHandler.cs
+++ b/src/Web/Grand.Web/Commands/Handler/Blogs/InsertBlogCommentCommandHandler.cs
@@ -68,7 +68,7 @@ namespace Grand.Web.Commands.Handler.Blogs
await _messageProviderService.SendBlogCommentMessage(request.BlogPost, comment, _languageSettings.DefaultAdminLanguageId);
//activity log
- await _customerActivityService.InsertActivity("PublicStore.AddBlogComment", comment.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.PublicStore.AddBlogComment"));
+ _ = _customerActivityService.InsertActivity("PublicStore.AddBlogComment", comment.Id, _workContext.CurrentCustomer, "", _translationService.GetResource("ActivityLog.PublicStore.AddBlogComment"));
return comment;
}
diff --git a/src/Web/Grand.Web/Commands/Handler/Common/ContactUsSendCommandHandler.cs b/src/Web/Grand.Web/Commands/Handler/Common/ContactUsSendCommandHandler.cs
index 9955245bf..a0e4df816 100644
--- a/src/Web/Grand.Web/Commands/Handler/Common/ContactUsSendCommandHandler.cs
+++ b/src/Web/Grand.Web/Commands/Handler/Common/ContactUsSendCommandHandler.cs
@@ -73,7 +73,7 @@ namespace Grand.Web.Commands.Handler.Common
request.Model = await SendContactUs(request, request.Store);
//activity log
- await _customerActivityService.InsertActivity("PublicStore.ContactUs", "",
+ _ = _customerActivityService.InsertActivity("PublicStore.ContactUs", "",
_workContext.CurrentCustomer, request.IpAddress,
_translationService.GetResource("ActivityLog.PublicStore.ContactUs"));
diff --git a/src/Web/Grand.Web/Commands/Handler/Common/PopupInteractiveCommandHandler.cs b/src/Web/Grand.Web/Commands/Handler/Common/PopupInteractiveCommandHandler.cs
index 962552b97..c9874710d 100644
--- a/src/Web/Grand.Web/Commands/Handler/Common/PopupInteractiveCommandHandler.cs
+++ b/src/Web/Grand.Web/Commands/Handler/Common/PopupInteractiveCommandHandler.cs
@@ -134,7 +134,7 @@ namespace Grand.Web.Commands.Handler.Common
await _mediator.Publish(new PopupInteractiveEvent(_workContext.CurrentCustomer, request.Form, enquiryForm));
//activity log
- await _customerActivityService.InsertActivity("PublicStore.InteractiveForm", form.Id,
+ _ = _customerActivityService.InsertActivity("PublicStore.InteractiveForm", form.Id,
_workContext.CurrentCustomer, "",
string.Format(_translationService.GetResource("ActivityLog.PublicStore.InteractiveForm"), form.Name));
}
diff --git a/src/Web/Grand.Web/Commands/Handler/Customers/DeleteAccountCommandHandler.cs b/src/Web/Grand.Web/Commands/Handler/Customers/DeleteAccountCommandHandler.cs
index c42846ebb..7c541288f 100644
--- a/src/Web/Grand.Web/Commands/Handler/Customers/DeleteAccountCommandHandler.cs
+++ b/src/Web/Grand.Web/Commands/Handler/Customers/DeleteAccountCommandHandler.cs
@@ -42,7 +42,7 @@ namespace Grand.Web.Commands.Handler.Customers
public async Task<bool> Handle(DeleteAccountCommand request, CancellationToken cancellationToken)
{
//activity log
- await _customerActivityService.InsertActivity("PublicStore.DeleteAccount", request.Customer.Id,
+ _ = _customerActivityService.InsertActivity("PublicStore.DeleteAccount", request.Customer.Id,
request.Customer, request.IpAddress,
_translationService.GetResource("ActivityLog.DeleteAccount"), request.Customer);
diff --git a/src/Web/Grand.Web/Controllers/ActionCartController.cs b/src/Web/Grand.Web/Controllers/ActionCartController.cs
index d2b4b2737..36541ef3a 100644
--- a/src/Web/Grand.Web/Controllers/ActionCartController.cs
+++ b/src/Web/Grand.Web/Controllers/ActionCartController.cs
@@ -221,7 +221,7 @@ namespace Grand.Web.Controllers
case ShoppingCartType.Wishlist:
{
//activity log
- await _customerActivityService.InsertActivity("PublicStore.AddToWishlist", product.Id,
+ _ = _customerActivityService.InsertActivity("PublicStore.AddToWishlist", product.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.PublicStore.AddToWishlist"), product.Name);
@@ -251,7 +251,7 @@ namespace Grand.Web.Controllers
default:
{
//activity log
- await _customerActivityService.InsertActivity("PublicStore.AddToShoppingCart", product.Id,
+ _ = _customerActivityService.InsertActivity("PublicStore.AddToShoppingCart", product.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.PublicStore.AddToShoppingCart"), product.Name);
@@ -532,7 +532,7 @@ namespace Grand.Web.Controllers
case ShoppingCartType.Wishlist:
{
//activity log
- await _customerActivityService.InsertActivity("PublicStore.AddToWishlist", product.Id,
+ _ = _customerActivityService.InsertActivity("PublicStore.AddToWishlist", product.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.PublicStore.AddToWishlist"), product.Name);
@@ -562,7 +562,7 @@ namespace Grand.Web.Controllers
default:
{
//activity log
- await _customerActivityService.InsertActivity("PublicStore.AddToShoppingCart", product.Id,
+ _ = _customerActivityService.InsertActivity("PublicStore.AddToShoppingCart", product.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.PublicStore.AddToShoppingCart"), product.Name);
@@ -693,7 +693,7 @@ namespace Grand.Web.Controllers
await auctionService.NewBid(customer, product, _workContext.CurrentStore, _workContext.WorkingLanguage, warehouseId, bid);
//activity log
- await _customerActivityService.InsertActivity("PublicStore.AddNewBid", product.Id,
+ _ = _customerActivityService.InsertActivity("PublicStore.AddNewBid", product.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.PublicStore.AddToBid"), product.Name);
diff --git a/src/Web/Grand.Web/Controllers/CatalogController.cs b/src/Web/Grand.Web/Controllers/CatalogController.cs
index 27c3cc96b..150008f27 100644
--- a/src/Web/Grand.Web/Controllers/CatalogController.cs
+++ b/src/Web/Grand.Web/Controllers/CatalogController.cs
@@ -145,7 +145,7 @@ namespace Grand.Web.Controllers
DisplayEditLink(Url.Action("Edit", "Category", new { id = category.Id, area = "Admin" }));
//activity log
- await _customerActivityService.InsertActivity("PublicStore.ViewCategory", category.Id,
+ _ = _customerActivityService.InsertActivity("PublicStore.ViewCategory", category.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.PublicStore.ViewCategory"), category.Name);
await _customerActionEventService.Viewed(customer, HttpContext.Request.Path.ToString(), Request.Headers[HeaderNames.Referer].ToString() != null ? Request.Headers["Referer"].ToString() : "");
@@ -200,7 +200,7 @@ namespace Grand.Web.Controllers
DisplayEditLink(Url.Action("Edit", "Brand", new { id = brand.Id, area = "Admin" }));
//activity log
- await _customerActivityService.InsertActivity("PublicStore.ViewBrand", brand.Id,
+ _ = _customerActivityService.InsertActivity("PublicStore.ViewBrand", brand.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.PublicStore.ViewBrand"), brand.Name);
await _customerActionEventService.Viewed(customer, HttpContext.Request.Path.ToString(), Request.Headers[HeaderNames.Referer].ToString() != null ? Request.Headers[HeaderNames.Referer].ToString() : "");
@@ -266,7 +266,7 @@ namespace Grand.Web.Controllers
DisplayEditLink(Url.Action("Edit", "Collection", new { id = collection.Id, area = "Admin" }));
//activity log
- await _customerActivityService.InsertActivity("PublicStore.ViewCollection", collection.Id,
+ _ = _customerActivityService.InsertActivity("PublicStore.ViewCollection", collection.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.PublicStore.ViewCollection"), collection.Name);
await _customerActionEventService.Viewed(customer, HttpContext.Request.Path.ToString(), Request.Headers[HeaderNames.Referer].ToString() != null ? Request.Headers[HeaderNames.Referer].ToString() : "");
@@ -402,7 +402,7 @@ namespace Grand.Web.Controllers
{
var vendorReview = await _mediator.Send(new InsertVendorReviewCommand() { Vendor = vendor, Store = _workContext.CurrentStore, Model = model });
//activity log
- await _customerActivityService.InsertActivity("PublicStore.AddVendorReview", vendor.Id,
+ _ = _customerActivityService.InsertActivity("PublicStore.AddVendorReview", vendor.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.PublicStore.AddVendorReview"), vendor.Name);
diff --git a/src/Web/Grand.Web/Controllers/CheckoutController.cs b/src/Web/Grand.Web/Controllers/CheckoutController.cs
index 01c56a99e..fac8b57c9 100644
--- a/src/Web/Grand.Web/Controllers/CheckoutController.cs
+++ b/src/Web/Grand.Web/Controllers/CheckoutController.cs
@@ -999,7 +999,7 @@ namespace Grand.Web.Controllers
var placeOrderResult = await _mediator.Send(new PlaceOrderCommand());
if (placeOrderResult.Success)
{
- await _customerActivityService.InsertActivity("PublicStore.PlaceOrder", "",
+ _ = _customerActivityService.InsertActivity("PublicStore.PlaceOrder", "",
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.PublicStore.PlaceOrder"), placeOrderResult.PlacedOrder.Id);
diff --git a/src/Web/Grand.Web/Controllers/CourseController.cs b/src/Web/Grand.Web/Controllers/CourseController.cs
index 3420ab1f5..5183bcac5 100644
--- a/src/Web/Grand.Web/Controllers/CourseController.cs
+++ b/src/Web/Grand.Web/Controllers/CourseController.cs
@@ -114,7 +114,7 @@ namespace Grand.Web.Controllers
DisplayEditLink(Url.Action("Edit", "Course", new { id = course.Id, area = "Admin" }));
//activity log
- await _customerActivityService.InsertActivity("PublicStore.ViewCourse", course.Id,
+ _ = _customerActivityService.InsertActivity("PublicStore.ViewCourse", course.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.PublicStore.ViewCourse"), course.Name);
await _customerActionEventService.Viewed(customer, HttpContext.Request.Path.ToString(), Request.Headers[HeaderNames.Referer].ToString() != null ? Request.Headers["Referer"].ToString() : "");
@@ -152,7 +152,7 @@ namespace Grand.Web.Controllers
DisplayEditLink(Url.Action("EditLesson", "Course", new { id = lesson.Id, area = "Admin" }));
//activity log
- await _customerActivityService.InsertActivity("PublicStore.ViewLesson", lesson.Id,
+ _ = _customerActivityService.InsertActivity("PublicStore.ViewLesson", lesson.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.PublicStore.ViewLesson"), lesson.Name);
await _customerActionEventService.Viewed(customer, HttpContext.Request.Path.ToString(), Request.Headers[HeaderNames.Referer].ToString() != null ? Request.Headers["Referer"].ToString() : "");
diff --git a/src/Web/Grand.Web/Controllers/KnowledgebaseController.cs b/src/Web/Grand.Web/Controllers/KnowledgebaseController.cs
index ca67c7352..9beb287d8 100644
--- a/src/Web/Grand.Web/Controllers/KnowledgebaseController.cs
+++ b/src/Web/Grand.Web/Controllers/KnowledgebaseController.cs
@@ -311,7 +311,7 @@ namespace Grand.Web.Controllers
await _messageProviderService.SendArticleCommentMessage(article, comment, _languageSettings.DefaultAdminLanguageId);
//activity log
- await _customerActivityService.InsertActivity("PublicStore.AddArticleComment", comment.Id,
+ _ = _customerActivityService.InsertActivity("PublicStore.AddArticleComment", comment.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.PublicStore.AddArticleComment"));
diff --git a/src/Web/Grand.Web/Controllers/NewsController.cs b/src/Web/Grand.Web/Controllers/NewsController.cs
index efd3c8f11..3feb1817c 100644
--- a/src/Web/Grand.Web/Controllers/NewsController.cs
+++ b/src/Web/Grand.Web/Controllers/NewsController.cs
@@ -128,7 +128,7 @@ namespace Grand.Web.Controllers
await _mediator.Publish(new NewsCommentEvent(newsItem, model.AddNewComment));
//activity log
- await _customerActivityService.InsertActivity("PublicStore.AddNewsComment", newsItem.Id,
+ _ = _customerActivityService.InsertActivity("PublicStore.AddNewsComment", newsItem.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.PublicStore.AddNewsComment"));
diff --git a/src/Web/Grand.Web/Controllers/ProductController.cs b/src/Web/Grand.Web/Controllers/ProductController.cs
index 135bd375b..935fa8e64 100644
--- a/src/Web/Grand.Web/Controllers/ProductController.cs
+++ b/src/Web/Grand.Web/Controllers/ProductController.cs
@@ -176,7 +176,7 @@ namespace Grand.Web.Controllers
}
//activity log
- await _customerActivityService.InsertActivity("PublicStore.ViewProduct", product.Id, _workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
+ _ = _customerActivityService.InsertActivity("PublicStore.ViewProduct", product.Id, _workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.PublicStore.ViewProduct"), product.Name);
await _customerActionEventService.Viewed(customer, this.HttpContext.Request.Path.ToString(), Request.Headers[HeaderNames.Referer].ToString() != null ? Request.Headers[HeaderNames.Referer].ToString() : "");
await _productService.UpdateMostView(product);
@@ -423,7 +423,7 @@ namespace Grand.Web.Controllers
await _recentlyViewedProductsService.AddProductToRecentlyViewedList(customer.Id, product.Id);
//activity log
- await _customerActivityService.InsertActivity("PublicStore.ViewProduct", product.Id, _workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
+ _ = _customerActivityService.InsertActivity("PublicStore.ViewProduct", product.Id, _workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.PublicStore.ViewProduct"), product.Name);
await _customerActionEventService.Viewed(customer, HttpContext.Request.Path.ToString(), Request.Headers[HeaderNames.Referer].ToString() != null ? Request.Headers[HeaderNames.Referer].ToString() : "");
await _productService.UpdateMostView(product);
@@ -546,7 +546,7 @@ namespace Grand.Web.Controllers
//notification
await _mediator.Publish(new ProductReviewEvent(product, model.AddProductReview));
- await _customerActivityService.InsertActivity("PublicStore.AddProductReview", product.Id,
+ _ = _customerActivityService.InsertActivity("PublicStore.AddProductReview", product.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.PublicStore.AddProductReview"), product.Name);
@@ -779,7 +779,7 @@ namespace Grand.Web.Controllers
});
//activity log
- await _customerActivityService.InsertActivity("PublicStore.AskQuestion", _workContext.CurrentCustomer.Id,
+ _ = _customerActivityService.InsertActivity("PublicStore.AskQuestion", _workContext.CurrentCustomer.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.PublicStore.AskQuestion"));
@@ -842,7 +842,7 @@ namespace Grand.Web.Controllers
});
//activity log
- await _customerActivityService.InsertActivity("PublicStore.AskQuestion", _workContext.CurrentCustomer.Id,
+ _ = _customerActivityService.InsertActivity("PublicStore.AskQuestion", _workContext.CurrentCustomer.Id,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.PublicStore.AskQuestion"));
//return Json
@@ -940,7 +940,7 @@ namespace Grand.Web.Controllers
AddCompareProductsCookie(comparedProductIds);
//activity log
- await _customerActivityService.InsertActivity("PublicStore.AddToCompareList", productId,
+ _ = _customerActivityService.InsertActivity("PublicStore.AddToCompareList", productId,
_workContext.CurrentCustomer, HttpContext.Connection?.RemoteIpAddress?.ToString(),
_translationService.GetResource("ActivityLog.PublicStore.AddToCompareList"), product.Name);