From bf21342abbe23568d5f2505dfab8ac18bc53001a Mon Sep 17 00:00:00 2001 From: Loretta Date: Wed, 13 Nov 2024 10:57:58 +0100 Subject: [PATCH] Improvements, refactoring, fixes, etc... --- Mango.Nop.Core/Entities/EntityBase.cs | 8 ++++++++ Mango.Nop.Core/Interfaces/ISoftRemoveEntity.cs | 10 ++++++++++ Mango.Nop.Core/Interfaces/ISoftRemoveEntityInt.cs | 9 +++++++++ Mango.Nop.Core/Mango.Nop.Core.csproj | 5 +++++ Mango.Nop.Core/Repositories/DalBase.cs | 15 +++++++++++++++ 5 files changed, 47 insertions(+) create mode 100644 Mango.Nop.Core/Entities/EntityBase.cs create mode 100644 Mango.Nop.Core/Interfaces/ISoftRemoveEntity.cs create mode 100644 Mango.Nop.Core/Interfaces/ISoftRemoveEntityInt.cs create mode 100644 Mango.Nop.Core/Repositories/DalBase.cs diff --git a/Mango.Nop.Core/Entities/EntityBase.cs b/Mango.Nop.Core/Entities/EntityBase.cs new file mode 100644 index 0000000..1d34c1f --- /dev/null +++ b/Mango.Nop.Core/Entities/EntityBase.cs @@ -0,0 +1,8 @@ +using AyCode.Interfaces.Entities; +using Nop.Core; + +namespace Mango.Nop.Core.Entities; + +public class EntityBase : BaseEntity, IEntityInt +{ +} \ No newline at end of file diff --git a/Mango.Nop.Core/Interfaces/ISoftRemoveEntity.cs b/Mango.Nop.Core/Interfaces/ISoftRemoveEntity.cs new file mode 100644 index 0000000..c2463d8 --- /dev/null +++ b/Mango.Nop.Core/Interfaces/ISoftRemoveEntity.cs @@ -0,0 +1,10 @@ +using AyCode.Interfaces.Entities; +using Nop.Core.Domain.Common; + +namespace Mango.Nop.Core.Interfaces; + +// ReSharper disable once PossibleInterfaceMemberAmbiguity +public interface ISoftRemoveEntity : IAcSoftRemoveEntity, ISoftDeletedEntity +{ + +} \ No newline at end of file diff --git a/Mango.Nop.Core/Interfaces/ISoftRemoveEntityInt.cs b/Mango.Nop.Core/Interfaces/ISoftRemoveEntityInt.cs new file mode 100644 index 0000000..cff43fa --- /dev/null +++ b/Mango.Nop.Core/Interfaces/ISoftRemoveEntityInt.cs @@ -0,0 +1,9 @@ +using AyCode.Interfaces.Entities; + +namespace Mango.Nop.Core.Interfaces; + +// ReSharper disable once PossibleInterfaceMemberAmbiguity +public interface ISoftRemoveEntityInt : IAcSoftRemoveEntityInt, ISoftRemoveEntity +{ + +} \ No newline at end of file diff --git a/Mango.Nop.Core/Mango.Nop.Core.csproj b/Mango.Nop.Core/Mango.Nop.Core.csproj index 98446ed..f047723 100644 --- a/Mango.Nop.Core/Mango.Nop.Core.csproj +++ b/Mango.Nop.Core/Mango.Nop.Core.csproj @@ -11,6 +11,11 @@ + + + + + ..\..\..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\Debug\net8.0\AyCode.Core.dll diff --git a/Mango.Nop.Core/Repositories/DalBase.cs b/Mango.Nop.Core/Repositories/DalBase.cs new file mode 100644 index 0000000..d978490 --- /dev/null +++ b/Mango.Nop.Core/Repositories/DalBase.cs @@ -0,0 +1,15 @@ +using System.Linq.Expressions; +using Nop.Core; +using Nop.Core.Caching; +using Nop.Core.Configuration; +using Nop.Core.Events; +using Nop.Data; + +namespace Mango.Nop.Core.Repositories; + +public class DalBase : EntityRepository where TEntity : BaseEntity +{ + public DalBase(IEventPublisher eventPublisher, INopDataProvider dataProvider, IShortTermCacheManager shortTermCacheManager, IStaticCacheManager staticCacheManager, AppSettings appSettings) : base(eventPublisher, dataProvider, shortTermCacheManager, staticCacheManager, appSettings) + { + } +} \ No newline at end of file