This commit is contained in:
2026-06-28 10:45:39 +03:30
parent 4f8147e469
commit 196f3b1fe4
4 changed files with 38 additions and 1 deletions
+7
View File
@@ -0,0 +1,7 @@
namespace xCategoryService.Constants
{
public struct XCategoryServiceConstants
{
public const string SubCategoryReference = "SubCat";
}
}
+6 -1
View File
@@ -8,7 +8,6 @@ using xCategoryService.Interfaces.Entities;
using xCategoryService.Providers;
using xCategoryService.Providers.Dtos;
using xCategoryService.Providers.Entities;
using xCategoryService.Providers.GraphQL;
using xCommons.Extensions;
using xCommons.Helpers;
using xDataService.Constants;
@@ -284,6 +283,12 @@ namespace xCategoryService.DI
new ServiceDescriptor(typeof(IXCategoryDescriptionResourceProvider), typeof(XCategoryDescriptionResourceProvider), lifeTime)
);
//
// Reference Providers ...
services.Add(
new ServiceDescriptor(typeof(IXCategorySubCategoryReferenceProvider), typeof(XCategorySubCategoryReferenceProvider), lifeTime)
);
//
// Provider ...
services.Add(
@@ -0,0 +1,8 @@
namespace xCategoryService.Interfaces
{
/// <summary>
/// a Service for SubCategory Referencing on Category ...
/// </summary>
public interface IXCategorySubCategoryReferenceProvider : IXBaseCategoryProvider<int>
{ }
}
@@ -0,0 +1,17 @@
using xCategoryService.Constants;
using xCategoryService.Interfaces;
using xCategoryService.Interfaces.Dtos;
namespace xCategoryService.Providers
{
public class XCategorySubCategoryReferenceProvider : XBaseCategoryProvider<int>, IXCategorySubCategoryReferenceProvider
{
public XCategorySubCategoryReferenceProvider(
IXCategoryServiceProvider categoryProvider
) : base(
categoryProvider: categoryProvider,
providedFor: XCategoryServiceConstants.SubCategoryReference
)
{ }
}
}