From 93aafe24f8d20290012a03ca091ea0b07512241c Mon Sep 17 00:00:00 2001 From: Hadi Khazaee Asl Date: Thu, 28 May 2026 02:31:21 +0330 Subject: [PATCH] last ... --- Controllers/XTagRepositoryController.cs | 32 +++++++++++++++++ .../XTagRepositoryProviderController.cs | 35 +++++++++++++++++++ Controllers/XTagServiceController.cs | 32 +++++++++++++++++ Controllers/XTagServiceProviderController.cs | 35 +++++++++++++++++++ DI/XDIHelperExtension.cs | 14 ++++++++ Interfaces/IXTestRepositoryProvider.cs | 2 +- xServices.csproj | 1 + 7 files changed, 150 insertions(+), 1 deletion(-) create mode 100644 Controllers/XTagRepositoryController.cs create mode 100644 Controllers/XTagRepositoryProviderController.cs create mode 100644 Controllers/XTagServiceController.cs create mode 100644 Controllers/XTagServiceProviderController.cs diff --git a/Controllers/XTagRepositoryController.cs b/Controllers/XTagRepositoryController.cs new file mode 100644 index 0000000..136032a --- /dev/null +++ b/Controllers/XTagRepositoryController.cs @@ -0,0 +1,32 @@ +using System; +using System.Linq; +using Microsoft.EntityFrameworkCore.Query; +using Microsoft.Extensions.Logging; +using xCommons.Configurations; +using xCommons.Providers; +using xTagService.Controllers; +using xTagService.Interfaces.Entities; +using xTagService.Models.Entities; + +namespace xServices.Controllers +{ + public class XTagRepositoryController : XTagRepositoryControllerBase + { + public XTagRepositoryController( + ILogger logger, + XAppConfiguration appConfiguration, + XValidationProvider validationProvider, + IXTagRepository repository, + Func, IOrderedQueryable> defaultOrderBuilder = null, + Func, IIncludableQueryable> defaultIncludeBuilder = null + ) : base( + logger, + appConfiguration, + validationProvider, + repository, + defaultOrderBuilder, + defaultIncludeBuilder + ) + { } + } +} \ No newline at end of file diff --git a/Controllers/XTagRepositoryProviderController.cs b/Controllers/XTagRepositoryProviderController.cs new file mode 100644 index 0000000..294174f --- /dev/null +++ b/Controllers/XTagRepositoryProviderController.cs @@ -0,0 +1,35 @@ +using System; +using System.Linq; +using Microsoft.EntityFrameworkCore.Query; +using Microsoft.Extensions.Logging; +using xCommons.Configurations; +using xCommons.Providers; +using xIdentityService.Interfaces; +using xTagService.Controllers; +using xTagService.Interfaces.Entities; +using xTagService.Models.Entities; + +namespace xServices.Controllers +{ + public class XTagRepositoryProviderController : XTagRepositoryProviderControllerBase + { + public XTagRepositoryProviderController( + ILogger logger, + XAppConfiguration appConfiguration, + IXIdentityProvider identityProvider, + XValidationProvider validationProvider, + IXTagRepositoryProvider provider, + Func, IOrderedQueryable> defaultOrderBuilder = null, + Func, IIncludableQueryable> defaultIncludeBuilder = null + ) : base( + logger, + appConfiguration, + identityProvider, + validationProvider, + provider, + defaultOrderBuilder, + defaultIncludeBuilder + ) + { } + } +} \ No newline at end of file diff --git a/Controllers/XTagServiceController.cs b/Controllers/XTagServiceController.cs new file mode 100644 index 0000000..92cb4d2 --- /dev/null +++ b/Controllers/XTagServiceController.cs @@ -0,0 +1,32 @@ +using System; +using System.Linq; +using Microsoft.EntityFrameworkCore.Query; +using Microsoft.Extensions.Logging; +using xCommons.Configurations; +using xCommons.Providers; +using xTagService.Controllers; +using xTagService.Interfaces.Dtos; +using xTagService.Models.Entities; + +namespace xServices.Controllers +{ + public class XTagServiceController : XTagServiceControllerBase + { + public XTagServiceController( + ILogger logger, + XAppConfiguration appConfiguration, + XValidationProvider validationProvider, + IXTagRepositoryService repositoryService, + Func, IOrderedQueryable> defaultOrderBuilder = null, + Func, IIncludableQueryable> defaultIncludeBuilder = null + ) : base( + logger, + appConfiguration, + validationProvider, + repositoryService, + defaultOrderBuilder, + defaultIncludeBuilder + ) + { } + } +} \ No newline at end of file diff --git a/Controllers/XTagServiceProviderController.cs b/Controllers/XTagServiceProviderController.cs new file mode 100644 index 0000000..7eabab1 --- /dev/null +++ b/Controllers/XTagServiceProviderController.cs @@ -0,0 +1,35 @@ +using System; +using System.Linq; +using Microsoft.EntityFrameworkCore.Query; +using Microsoft.Extensions.Logging; +using xCommons.Configurations; +using xCommons.Providers; +using xIdentityService.Interfaces; +using xTagService.Controllers; +using xTagService.Interfaces.Dtos; +using xTagService.Models.Entities; + +namespace xServices.Controllers +{ + public class XTagServiceProviderController : XTagServiceProviderControllerBase + { + public XTagServiceProviderController( + ILogger logger, + XAppConfiguration appConfiguration, + IXIdentityProvider identityProvider, + XValidationProvider validationProvider, + IXTagServiceProvider provider, + Func, IOrderedQueryable> defaultOrderBuilder = null, + Func, IIncludableQueryable> defaultIncludeBuilder = null + ) : base( + logger, + appConfiguration, + identityProvider, + validationProvider, + provider, + defaultOrderBuilder, + defaultIncludeBuilder + ) + { } + } +} \ No newline at end of file diff --git a/DI/XDIHelperExtension.cs b/DI/XDIHelperExtension.cs index fcdd298..9b45139 100644 --- a/DI/XDIHelperExtension.cs +++ b/DI/XDIHelperExtension.cs @@ -17,6 +17,7 @@ using xServices.Interfaces; using xServices.Providers; using xStorageService.DI; using xStringService.DI; +using xTagService.DI; using xTermsAndConditionsService.DI; namespace xServices.DI @@ -192,6 +193,12 @@ namespace xServices.DI // // Using Terms and Conditions Service ... app.UseXTermsAndConditionsService(); + + // + // Using Tag Service ... + app.UseXTagService( + isDevelopmentEnvironment: isDevelopmentEnvironment + ); } // @@ -291,6 +298,13 @@ namespace xServices.DI lifeTime: lifeTime, configuration: configuration ); + + // + // Register Tag Service ... + services.AddXTagService( + lifeTime: lifeTime, + repositoryType: xDataService.Constants.XRepositoryType.EF + ); } #endregion } diff --git a/Interfaces/IXTestRepositoryProvider.cs b/Interfaces/IXTestRepositoryProvider.cs index d4fcc2a..10e05c3 100644 --- a/Interfaces/IXTestRepositoryProvider.cs +++ b/Interfaces/IXTestRepositoryProvider.cs @@ -5,6 +5,6 @@ using xServices.Providers; namespace xServices.Interfaces { - public interface IXTestRepositoryProvider : IXBaseEntityProviderr + public interface IXTestRepositoryProvider : IXBaseEntityProvider { } } \ No newline at end of file diff --git a/xServices.csproj b/xServices.csproj index b177256..677b03e 100644 --- a/xServices.csproj +++ b/xServices.csproj @@ -34,6 +34,7 @@ +