Implement xCategory Service Registration ...

This commit is contained in:
2026-05-31 00:38:24 +03:30
parent e79b89ca71
commit 54a6c7c26b
+17 -7
View File
@@ -3,8 +3,7 @@ using System.Linq;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using xCategoryService.Interfaces; using xCategoryService.DI;
using xCategoryService.Providers;
using xCommons.Extensions; using xCommons.Extensions;
using xDataService.DI; using xDataService.DI;
using xDataService.Models; using xDataService.Models;
@@ -208,6 +207,11 @@ namespace xServices.DI
app.UseXFileService( app.UseXFileService(
isDevelopmentEnvironment: isDevelopmentEnvironment isDevelopmentEnvironment: isDevelopmentEnvironment
); );
//
// Using Category Service ...
app.UseXCategoryService(
isDevelopmentEnvironment: isDevelopmentEnvironment
);
} }
// //
@@ -295,11 +299,14 @@ namespace xServices.DI
services.AddScoped<IXTestRepositoryProvider, XTestRepositoryProvider>(); services.AddScoped<IXTestRepositoryProvider, XTestRepositoryProvider>();
#endregion #endregion
//
var repositoryType = xDataService.Constants.XRepositoryType.EF;
// //
// Register String Service ... // Register String Service ...
services.AddXStringService<XApiDbContext>( services.AddXStringService<XApiDbContext>(
lifeTime: lifeTime, lifeTime: lifeTime,
repositoryType: xDataService.Constants.XRepositoryType.EF repositoryType: repositoryType
); );
// //
@@ -313,19 +320,22 @@ namespace xServices.DI
// Register Tag Service ... // Register Tag Service ...
services.AddXTagService<XApiDbContext>( services.AddXTagService<XApiDbContext>(
lifeTime: lifeTime, lifeTime: lifeTime,
repositoryType: xDataService.Constants.XRepositoryType.EF repositoryType: repositoryType
); );
// //
// Register File Service ... // Register File Service ...
services.AddXFileService<XApiDbContext>( services.AddXFileService<XApiDbContext>(
lifeTime: lifeTime, lifeTime: lifeTime,
repositoryType: xDataService.Constants.XRepositoryType.EF repositoryType: repositoryType
); );
// //
// TODO: Remove this ... // Register Category Service ...
services.AddScoped<IXSubCategoryTitleResourceProvider, XSubCategoryTitleResourceProvider>(); services.AddXCategoryService<XApiDbContext>(
lifeTime: lifeTime,
repositoryType: repositoryType
);
} }
#endregion #endregion
} }