From 54a6c7c26be716787fd8d252168340db194acd4b Mon Sep 17 00:00:00 2001 From: Hadi Khazaee Asl Date: Sun, 31 May 2026 00:38:24 +0330 Subject: [PATCH] Implement xCategory Service Registration ... --- DI/XDIHelperExtension.cs | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/DI/XDIHelperExtension.cs b/DI/XDIHelperExtension.cs index 18c5b72..669b275 100644 --- a/DI/XDIHelperExtension.cs +++ b/DI/XDIHelperExtension.cs @@ -3,8 +3,7 @@ using System.Linq; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -using xCategoryService.Interfaces; -using xCategoryService.Providers; +using xCategoryService.DI; using xCommons.Extensions; using xDataService.DI; using xDataService.Models; @@ -208,6 +207,11 @@ namespace xServices.DI app.UseXFileService( isDevelopmentEnvironment: isDevelopmentEnvironment ); + // + // Using Category Service ... + app.UseXCategoryService( + isDevelopmentEnvironment: isDevelopmentEnvironment + ); } // @@ -295,11 +299,14 @@ namespace xServices.DI services.AddScoped(); #endregion + // + var repositoryType = xDataService.Constants.XRepositoryType.EF; + // // Register String Service ... services.AddXStringService( lifeTime: lifeTime, - repositoryType: xDataService.Constants.XRepositoryType.EF + repositoryType: repositoryType ); // @@ -313,19 +320,22 @@ namespace xServices.DI // Register Tag Service ... services.AddXTagService( lifeTime: lifeTime, - repositoryType: xDataService.Constants.XRepositoryType.EF + repositoryType: repositoryType ); // // Register File Service ... services.AddXFileService( lifeTime: lifeTime, - repositoryType: xDataService.Constants.XRepositoryType.EF + repositoryType: repositoryType ); // - // TODO: Remove this ... - services.AddScoped(); + // Register Category Service ... + services.AddXCategoryService( + lifeTime: lifeTime, + repositoryType: repositoryType + ); } #endregion }