Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
Delete unused HistoryExtensions
KrzysztofPajak769235dedbc3
diff --git a/src/Business/Grand.Business.Core/Extensions/HistoryExtensions.cs b/src/Business/Grand.Business.Core/Extensions/HistoryExtensions.csdeleted file mode 100644index 33c2e454a..000000000--- a/src/Business/Grand.Business.Core/Extensions/HistoryExtensions.cs+++ /dev/null@@ -1,27 +0,0 @@-using Grand.Business.Core.Interfaces.Common.Directory;-using Grand.Domain;-using Grand.Domain.History;--namespace Grand.Business.Core.Extensions;--public static class HistoryExtensions-{- /// <summary>- /// Save an entity- /// </summary>- /// <param name="entity">Entity</param>- /// <param name="historyService"></param>- public static async Task SaveHistory<T>(this BaseEntity entity, IHistoryService historyService)- where T : BaseEntity, IHistory- {- ArgumentNullException.ThrowIfNull(entity);-- await historyService.SaveObject(entity);- }-- public static async Task<IList<HistoryObject>> GetHistoryObject(this BaseEntity entity,- IHistoryService historyService)- {- return await historyService.GetHistoryObjectForEntity(entity);- }-}\ No newline at end of filediff --git a/src/Business/Grand.Business.Marketing/Services/Newsletters/NewsLetterSubscriptionService.cs b/src/Business/Grand.Business.Marketing/Services/Newsletters/NewsLetterSubscriptionService.csindex 6a356189e..770082589 100644--- a/src/Business/Grand.Business.Marketing/Services/Newsletters/NewsLetterSubscriptionService.cs+++ b/src/Business/Grand.Business.Marketing/Services/Newsletters/NewsLetterSubscriptionService.cs@@ -83,7 +83,7 @@ public class NewsLetterSubscriptionService : INewsLetterSubscriptionServiceawait PublishSubscriptionEvent(newsLetterSubscription.Email, true, publishSubscriptionEvents);//save history- await newsLetterSubscription.SaveHistory<NewsLetterSubscription>(_historyService);+ await _historyService.SaveObject(newsLetterSubscription);//Publish eventawait _mediator.EntityInserted(newsLetterSubscription);@@ -109,8 +109,8 @@ public class NewsLetterSubscriptionService : INewsLetterSubscriptionServiceawait _subscriptionRepository.UpdateAsync(newsLetterSubscription);//save history- await newsLetterSubscription.SaveHistory<NewsLetterSubscription>(_historyService);-+ await _historyService.SaveObject(newsLetterSubscription);+//Publish the un/subscribe eventif (prevNewsLetterSubscription != null)switch (newsLetterSubscription.Active)