diff --git a/ContextGenerator.ps1 b/ContextGenerator.ps1
index 665f096..ec2ee06 100644
--- a/ContextGenerator.ps1
+++ b/ContextGenerator.ps1
@@ -8,7 +8,7 @@ $timestamp = Get-Date -Format 'yyyyMMdd_HHmmss'
if ([string]::IsNullOrWhiteSpace($Path)) {
# If no path is provided, use current path
$searchPath = (Get-Location).Path
- $outputFile = ".\xDashboard-$timestamp.txt"
+ $outputFile = ".\Documents\GeneratedContext\xDashboard-$timestamp.txt"
}
else {
if (-not (Test-Path -LiteralPath $Path -PathType Container)) {
@@ -24,7 +24,7 @@ else {
# Make folder name safe for file name
$safeLastFolder = $lastFolder -replace '[\\/:*?"<>|]', '_'
- $outputFile = ".\xDashboard-$safeLastFolder-$timestamp.txt"
+ $outputFile = ".\Documents\GeneratedContext\xDashboard-$safeLastFolder-$timestamp.txt"
}
Get-ChildItem -LiteralPath $searchPath -Recurse -File |
diff --git a/ContextGenerator.sh b/ContextGenerator.sh
index 6f4be53..72536b3 100644
--- a/ContextGenerator.sh
+++ b/ContextGenerator.sh
@@ -33,7 +33,7 @@ else
fi
TIMESTAMP="$(date +%Y%m%d_%H%M%S)"
-OUTPUT_FILE="./${OUTPUT_PREFIX}-${TIMESTAMP}.txt"
+OUTPUT_FILE="./Documents/GeneratedContext/${OUTPUT_PREFIX}-${TIMESTAMP}.txt"
find "$SEARCH_PATH" -type f \( \
-name "Dockerfile" \
diff --git a/Documents/GeneratedContext/.gitkeep b/Documents/GeneratedContext/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/Documents/GeneratedContext/xDashboard-xAiModels-20260807_230143.txt b/Documents/GeneratedContext/xDashboard-xAiModels-20260807_230143.txt
new file mode 100644
index 0000000..b19c399
--- /dev/null
+++ b/Documents/GeneratedContext/xDashboard-xAiModels-20260807_230143.txt
@@ -0,0 +1,4151 @@
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Configurations\XAiApiConfiguration.cs
+
+using xAiModels.Constants;
+using xAiModels.Models;
+
+namespace xAiModels.Configurations
+{
+ public class XAiApiConfiguration
+ {
+ ///
+ /// Model Providers ...
+ ///
+ public XAiModelDescriptor[] Models { get; set; } = [];
+
+ ///
+ /// Each User must Has a Default Project, this is Title Resource Identifier ...
+ ///
+ public string DefaultProjectTitleResource { get; set; } = XAiModelsConstants.DefaultXAiProjectTitleResourceID;
+
+ ///
+ /// Each User must Has a Default Project, this is Description Resource Identifier ...
+ ///
+ public string DefaultProjectDescriptionResource { get; set; } = XAiModelsConstants.DefaultXAiProjectDescriptionResourceID;
+
+ ///
+ /// Each User must Has a Default Conversation, this is Title Resource Identifier ... ...
+ ///
+ public string DefaultConversationTitleResource { get; set; } = XAiModelsConstants.DefaultXAiConversationTitleResourceID;
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Configurations\XAiModelMappersProfile.cs
+
+using AutoMapper;
+using xAiModels.Configurations.Entities;
+using xAiModels.Models.Dtos;
+using xAiModels.Models.Entities;
+
+namespace xAiModels.Configurations
+{
+ public class XAiModelMappersProfile : Profile
+ {
+ public XAiModelMappersProfile()
+ {
+ //
+ // XAiMessage ...
+ CreateMap()
+ .AfterMap();
+
+ //
+ // XAiProject ...
+ CreateMap()
+ .AfterMap();
+
+ //
+ // XAiConversation ...
+ CreateMap()
+ .AfterMap();
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Configurations\Entities\XAiConversationEntityConfiguration.cs
+
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using xAiModels.Constants;
+using xAiModels.Models.Entities;
+using xDataService.Providers;
+
+namespace xAiModels.Configurations.Entities
+{
+ public class XAiConversationEntityConfiguration : XBaseEntityTypeConfiguration
+ {
+ public override void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable(XAiModelsConstants.XAiConversationTable);
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Configurations\Entities\XAiConversationMappingAction.cs
+
+using AutoMapper;
+using xAiModels.Interfaces;
+using xAiModels.Models.Dtos;
+using xAiModels.Models.Entities;
+using xCommons.Extensions;
+using xIdentityService.Interfaces;
+using xIdentityService.Extensions;
+using xAiModels.Interfaces.Dtos;
+
+namespace xAiModels.Configurations.Entities
+{
+ public class XAiConversationMappingAction : IMappingAction
+ {
+ private readonly IXIdentityProvider identityProvider;
+ private readonly IXAiProjectRepositoryService projectRepositoryService;
+ private readonly IXAiConversationTitleResourceProvider conversationTitleResourceProvider;
+
+ public XAiConversationMappingAction(
+ IXIdentityProvider identityProvider,
+ IXAiProjectRepositoryService projectRepositoryService,
+ IXAiConversationTitleResourceProvider conversationTitleResourceProvider
+ )
+ {
+ this.identityProvider = identityProvider;
+ this.projectRepositoryService = projectRepositoryService;
+ this.conversationTitleResourceProvider = conversationTitleResourceProvider;
+ }
+
+ public void Process(
+ XAiConversation source,
+ XAiConversationDto destination,
+ ResolutionContext context
+ )
+ {
+ //
+ #region Handle Owner ...
+ if (!source.OwnerId.IsNullOrEmpty())
+ {
+ //
+ // Retrieve Owner ...
+ var device = identityProvider.GetDevice();
+ var ownerUserInfo = identityProvider.GetUserInfo(
+ device: device,
+ userSelectByParam: source.OwnerId
+ )
+ .GetAwaiter()
+ .GetResult();
+ var owner = ownerUserInfo.ToXPersonDto();
+
+ //
+ // Setting Owner ...
+ destination.Owner = owner;
+ }
+ #endregion
+
+ //
+ #region Handle Title Locales ...
+ if (!source.Title.IsNullOrEmpty())
+ {
+ //
+ // Retrieve Locales ...
+ var titleLocales = conversationTitleResourceProvider.GetLocales(
+ identifier: source.Title,
+ cancellationToken: default
+ )
+ .GetAwaiter()
+ .GetResult();
+
+ //
+ // Attach to Destination ...
+ destination.TitleLocales = [.. titleLocales];
+ }
+ #endregion
+
+ //
+ #region Handle Project Info ...
+ if (!source.ProjectId.IsNull() &&
+ !source.ProjectId.IsDefaultGuid()
+ )
+ {
+ //
+ // Check Project Title ...
+ var project = projectRepositoryService.GetAsync(
+ id: source.ProjectId,
+ includeBuilder: null,
+ ignoreSoftDeleteds: true,
+ cancellationToken: default
+ )
+ .GetAwaiter()
+ .GetResult();
+
+ //
+ // Attach to Destination ...
+ destination.ProjectTitle = project.Title;
+ destination.ProjectDescription = project.Description;
+ destination.ProjectTitleLocales = project.TitleLocales;
+ destination.ProjectDescriptionLocales = project.DescriptionLocales;
+ }
+ #endregion
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Configurations\Entities\XAiMessageEntityConfiguration.cs
+
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using xAiModels.Constants;
+using xAiModels.Models.Entities;
+using xDataService.Providers;
+
+namespace xAiModels.Configurations.Entities
+{
+ public class XAiMessageEntityConfiguration : XBaseEntityTypeConfiguration
+ {
+ public override void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable(XAiModelsConstants.XAiMessageTable);
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Configurations\Entities\XAiMessageMappingAction.cs
+
+using System;
+using AutoMapper;
+using xAiModels.Models.Dtos;
+using xAiModels.Models.Entities;
+using xIdentityService.Extensions;
+using xIdentityService.Interfaces;
+
+namespace xAiModels.Configurations.Entities
+{
+ public class XAiMessageMappingAction : IMappingAction
+ {
+ private readonly IXIdentityProvider identityProvider;
+
+ public XAiMessageMappingAction(
+ IXIdentityProvider identityProvider
+ )
+ {
+ this.identityProvider = identityProvider;
+ }
+
+ public void Process(
+ XAiMessage source,
+ XAiMessageDto destination,
+ ResolutionContext context
+ )
+ {
+ //
+ // Retrieve Owner ...
+ var device = identityProvider.GetDevice();
+ var ownerUserInfo = identityProvider.GetUserInfo(
+ device: device,
+ userSelectByParam: source.OwnerId
+ )
+ .GetAwaiter()
+ .GetResult();
+ var owner = ownerUserInfo.ToXPersonDto();
+
+ //
+ // Setting Owner ...
+ destination.Owner = owner;
+
+ //
+ // Retrieve Owner ...
+ // Retrieve Conversation ...
+ throw new NotImplementedException();
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Configurations\Entities\XAiProjectEntityConfiguration.cs
+
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using xAiModels.Constants;
+using xAiModels.Models.Entities;
+using xDataService.Providers;
+
+namespace xAiModels.Configurations.Entities
+{
+ public class XAiProjectEntityConfiguration : XBaseEntityTypeConfiguration
+ {
+ public override void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable(XAiModelsConstants.XAiProjectTable);
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Configurations\Entities\XAiProjectMappingAction.cs
+
+using System;
+using AutoMapper;
+using xAiModels.Models.Dtos;
+using xAiModels.Models.Entities;
+using xIdentityService.Extensions;
+using xIdentityService.Interfaces;
+
+namespace xAiModels.Configurations.Entities
+{
+ public class XAiProjectMappingAction : IMappingAction
+ {
+ private readonly IXIdentityProvider identityProvider;
+
+ public XAiProjectMappingAction(
+ IXIdentityProvider identityProvider
+ )
+ {
+ this.identityProvider = identityProvider;
+ }
+
+ public void Process(
+ XAiProject source,
+ XAiProjectDto destination,
+ ResolutionContext context
+ )
+ {
+ //
+ // Retrieve Owner ...
+ var device = identityProvider.GetDevice();
+ var ownerUserInfo = identityProvider.GetUserInfo(
+ device: device,
+ userSelectByParam: source.OwnerId
+ )
+ .GetAwaiter()
+ .GetResult();
+ var owner = ownerUserInfo.ToXPersonDto();
+
+ //
+ // Setting Owner ...
+ destination.Owner = owner;
+
+ //
+ // Retrieve Owner ...
+ // Retrieve Title Resources ...
+ // Retrieve Description Resources ...
+ throw new NotImplementedException();
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Constants\ConfigurationNodeNames.cs
+
+namespace xAiModels.Constants
+{
+ public partial struct ConfigurationNodeNames
+ {
+ public const string AI_API_NODE = "AiApiConfiguration";
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Constants\XAiChatRole.cs
+
+using xExceptions.Attributes;
+
+namespace xAiModels.Constants
+{
+ public struct XAiChatRoles
+ {
+ public const string None = "none";
+ public const string User = "user";
+ public const string Tool = "tool";
+ public const string System = "system";
+ public const string Assistant = "assistant";
+ }
+
+ public enum XAiChatRole
+ {
+ [StringValue(XAiChatRoles.None)]
+ None,
+ [StringValue(XAiChatRoles.User)]
+ User,
+ [StringValue(XAiChatRoles.Tool)]
+ Tool,
+ [StringValue(XAiChatRoles.System)]
+ System,
+ [StringValue(XAiChatRoles.Assistant)]
+ Assistant,
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Constants\XAiModelProviderType.cs
+
+namespace xAiModels.Constants
+{
+ ///
+ /// Specifiy Provider Type ...
+ ///
+ public enum XAiModelProviderType
+ {
+ None,
+ Ollama,
+ DeepSeek,
+ HuggingFace
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Constants\XAiModelsConstants.cs
+
+namespace xAiModels.Constants
+{
+ public struct XAiModelsConstants
+ {
+ //
+ // Service Extensions Log Tag ...
+ public const string XAiModelsDILogTag = "XAiModels";
+
+ //
+ // Table Mapping Identifiers ...
+ public const string XAiMessageTable = "AiMessages";
+ public const string XAiProjectTable = "AiProjects";
+ public const string XAiConversationTable = "AiConversations";
+
+ //
+ // GraphQL Collection Mappings ...
+ public const string XAiMessageSingleName = "aiMessage";
+ public const string XAiProjectSingleName = "aiProject";
+ public const string XAiConversationSignleName = "aiConversation";
+
+ public const string XAiMessageCollectionName = "aiMessages";
+ public const string XAiProjectCollectionName = "AiProjectsa";
+ public const string XAiConversationCollectionName = "aiConversations";
+
+ //
+ // Hubs ...
+ public const string XAiMessageDtoHub = "aiMessageDto";
+ public const string XAiMessageEntityHub = "aiMessageEntity";
+
+ public const string XAiProjectDtoHub = "aiProjectDto";
+ public const string XAiProjectEntityHub = "aiProjectEntity";
+
+ public const string XAiConversationDtoHub = "aiConversationDto";
+ public const string XAiConversationEntityHub = "aiConversationEntity";
+
+ //
+ // Resource Provider Identifiers ...
+ public const string XAiProjectTitleIdentifier = "AiPrjT";
+ public const string XAiProjectDescriptionIdentifier = "AiPrjD";
+ public const string XAiConversationTitleIdentifier = "AiCnvrT";
+
+ //
+ // EF Repositories Helper Extensions ...
+ public const string GetXAiMessageEFRepositoryDescriptor = "GetXAiMessageEFRepositoryDescriptor";
+ public const string GetXAiProjectEFRepositoryDescriptor = "GetXAiProjectEFRepositoryDescriptor";
+ public const string GetXAiConversationEFRepositoryDescriptor = "GetXAiConversationEFRepositoryDescriptor";
+
+ //
+ public const string DefaultXAiProjectTitleResourceID = "XAiPrjT";
+ public const string DefaultXAiConversationTitleResourceID = "XAiCnvT";
+ public const string DefaultXAiProjectDescriptionResourceID = "XAiPrjD";
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\DI\XDIHelperExtension.cs
+
+using System;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.Extensions.DependencyInjection;
+using xAiModels.Providers.Dtos;
+using xAiModels.Providers.Entities;
+using xCommons.Extensions;
+using xDataService.Constants;
+using xDataService.Db;
+using xDataService.Models;
+using xExceptions.Constants;
+using xPushService.Helpers;
+using xPushService.DI;
+using xDataService.DI;
+using xAiModels.Interfaces.Dtos;
+using xAiModels.Helpers;
+using xCommons.Helpers;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Interfaces;
+using xAiModels.Providers;
+using xAiModels.Constants;
+
+namespace xAiModels.DI
+{
+ ///
+ /// Service Registration Extensions Classes ...
+ ///
+ public static class XDIHelperExtension
+ {
+ ///
+ /// Register Service ...
+ ///
+ ///
+ ///
+ ///
+ public static void AddXAiDataService(
+ this IServiceCollection services,
+ XRepositoryType repositoryType,
+ ServiceLifetime lifeTime = ServiceLifetime.Scoped
+ )
+ {
+ AddAiDataService(
+ contextType: null,
+ services: services,
+ lifeTime: lifeTime,
+ repositoryType: repositoryType
+ );
+ }
+
+ ///
+ /// Register Service ...
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static void AddXAiDataService(
+ this IServiceCollection services,
+ XRepositoryType repositoryType,
+ ServiceLifetime lifeTime = ServiceLifetime.Scoped
+ )
+ where TContext : XDbContext
+ {
+ AddAiDataService(
+ services: services,
+ lifeTime: lifeTime,
+ contextType: typeof(TContext),
+ repositoryType: repositoryType
+ );
+ }
+
+ ///
+ /// Use XSubCategoryService Middleware ...
+ ///
+ ///
+ ///
+ public static void UseXAiDataService(
+ this IApplicationBuilder app,
+ bool isDevelopmentEnvironment = false
+ )
+ {
+ //
+ #region Using Hubs ...
+ //
+ var pushHelper = new XPushServiceHelper();
+
+ //
+ // XAiMessage ...
+ pushHelper.AddHub(XAiModelsConstants.XAiMessageDtoHub);
+ pushHelper.AddHub(XAiModelsConstants.XAiMessageEntityHub);
+
+ //
+ // XAiProject ...
+ pushHelper.AddHub(XAiModelsConstants.XAiProjectDtoHub);
+ pushHelper.AddHub(XAiModelsConstants.XAiProjectEntityHub);
+
+ //
+ // XAiConversation ...
+ pushHelper.AddHub(XAiModelsConstants.XAiConversationDtoHub);
+ pushHelper.AddHub(XAiModelsConstants.XAiConversationEntityHub);
+
+ //
+ app.UseXPushService(pushHelper);
+ #endregion
+
+ //
+ // Using XAiConversation Repository Descriptor ...
+ if (!aiConversationDescriptor.IsNull())
+ {
+ //
+ app.UseXRepository(
+ descriptor: aiConversationDescriptor,
+ isDevelopmentEnvironment: isDevelopmentEnvironment
+ );
+ }
+
+ //
+ // Using XAiMessage Repository Descriptor ...
+ if (!aiMessageDescriptor.IsNull())
+ {
+ //
+ app.UseXRepository(
+ descriptor: aiMessageDescriptor,
+ isDevelopmentEnvironment: isDevelopmentEnvironment
+ );
+ }
+
+ //
+ // Using XAiProject Repository Descriptor ...
+ if (!aiProjectDescriptor.IsNull())
+ {
+ //
+ app.UseXRepository(
+ descriptor: aiProjectDescriptor,
+ isDevelopmentEnvironment: isDevelopmentEnvironment
+ );
+ }
+
+ //
+ // Create an Scope for Services Acces ...
+ // Handle Seeding Category/SubCategory Resources ...
+ // TODO: Enable Seeding if Required ...
+ // using (var scope = app.ApplicationServices.CreateScope())
+ // {
+ // //
+ // // Retrieve Configuratuions ...
+ // var aiMessageProvider = scope.ServiceProvider.GetService();
+ // var aiProjectProvider = scope.ServiceProvider.GetService();
+ // var aiConversationProvider = scope.ServiceProvider.GetService();
+ // var configuration = scope.ServiceProvider.GetService();
+ // if (!configuration.IsNullOrDefault() &&
+ // !categoryProvider.IsNullOrDefault() &&
+ // !subaiConversationDescriptor.IsNullOrDefault()
+ // )
+ // {
+ // //
+ // // Logging ...
+ // Log("Start Seeding ...");
+
+ // //
+ // // Count Data in Category ...
+ // var hasCategory = (categoryProvider.Count().GetAwaiter().GetResult()) > 0;
+ // var hasSubCategory = (subCategoryProvider.Count().GetAwaiter().GetResult()) > 0;
+
+ // //
+ // // Seed Category Resources ...
+ // var canSeed =
+ // !hasCategory &&
+ // configuration.Categories.HasChild();
+ // if (canSeed)
+ // {
+ // //
+ // // Loop through Provided items ...
+ // foreach (var cat in configuration.Categories)
+ // {
+ // //
+ // try
+ // {
+ // //
+ // Log($"Start Seeding Category: {cat.Titles.Locales.ToArray()[0].Value} ...");
+
+ // //
+ // categoryProvider.Refresh(
+ // resource: cat,
+ // userInfo: null,
+ // connectionId: null,
+ // cancellationToken: default
+ // )
+ // .GetAwaiter()
+ // .GetResult();
+
+ // //
+ // Log($"Seeding Category: {cat.Titles.Locales.ToArray()[0].Value} Finished Successfully ...");
+ // }
+ // catch (Exception ex)
+ // {
+ // Log($"Seeding Category: {cat.Titles.Locales.ToArray()[0].Value} Failed due: {ex.Message} ...");
+ // }
+ // }
+ // }
+
+ // //
+ // // Seed SubCategory Resources ...
+ // canSeed =
+ // !hasSubCategory &&
+ // configuration.SubCategories.HasChild();
+ // if (canSeed)
+ // {
+ // //
+ // // Loop through Provided items ...
+ // foreach (var subcat in configuration.SubCategories)
+ // {
+ // //
+ // try
+ // {
+ // //
+ // Log($"Start Seeding SubCategory: {subcat.Titles.Locales.ToArray()[0].Value} ...");
+
+ // //
+ // subCategoryProvider.Refresh(
+ // userInfo: null,
+ // resource: subcat,
+ // connectionId: null,
+ // cancellationToken: default
+ // )
+ // .GetAwaiter()
+ // .GetResult();
+
+ // //
+ // Log($"Seeding SubCategory: {subcat.Titles.Locales.ToArray()[0].Value} Finished Successfully ...");
+ // }
+ // catch (Exception ex)
+ // {
+ // Log($"Seeding SubCategory: {subcat.Titles.Locales.ToArray()[0].Value} Failed due: {ex.Message} ...");
+ // }
+ // }
+ // }
+
+ // //
+ // Log("Finish Seeding ...");
+ // }
+ // }
+ }
+
+ //
+ #region Private ...
+ private static XRepositoryDescriptor aiMessageDescriptor = null;
+ private static XRepositoryDescriptor aiProjectDescriptor = null;
+ private static XRepositoryDescriptor aiConversationDescriptor = null;
+
+ ///
+ /// a LogTag for Service ...
+ ///
+ private static string XLogTag = XAiModelsConstants.XAiModelsDILogTag;
+
+ ///
+ /// print a log in Console ...
+ ///
+ ///
+ private static void Log(string message)
+ {
+ Console.WriteLine($"{XLogTag} => {message}");
+ }
+
+ ///
+ /// Register Service ...
+ ///
+ ///
+ ///
+ ///
+ ///
+ private static void AddAiDataService(
+ IServiceCollection services,
+ XRepositoryType repositoryType,
+ Type contextType = null,
+ ServiceLifetime lifeTime = ServiceLifetime.Scoped
+ )
+ {
+ //
+ var exception = XException.InvalidArgs.ToException(); ;
+
+ //
+ // Services ...
+ var isServicesExists = !services.IsNull();
+ if (!isServicesExists)
+ {
+ //
+ Log("Service Registration failed, services not provided ...");
+ throw exception;
+ }
+
+ //
+ // Lifetime ...
+ var isLifetimeExists = !lifeTime.IsNull();
+ if (!isLifetimeExists)
+ {
+ //
+ Log("Service Registration failed, lifetime not provided ...");
+ throw exception;
+ }
+
+ //
+ // Validate Repository Type ...
+ var isRepositoryTypeValid =
+ (repositoryType == XRepositoryType.EF &&
+ !contextType.IsNull()) ||
+ ((repositoryType == XRepositoryType.Mongo ||
+ repositoryType == XRepositoryType.InMemory) &&
+ contextType.IsNull());
+ if (!isRepositoryTypeValid)
+ {
+ //
+ Log("Service Registration failed, Invalid Repository Type and Context Type ...");
+ throw exception;
+ }
+
+ //
+ // Maske Instance of Repository Descriptor
+ // Based on Provided Type ...
+ switch (repositoryType)
+ {
+ //
+ case XRepositoryType.EF:
+ //
+ // XAiMessage ...
+ aiMessageDescriptor = typeof(XAiModelsHelper)
+ .InvokeGenericMethod(
+ args: null,
+ runtimeType: contextType,
+ methodName: XAiModelsConstants.GetXAiMessageEFRepositoryDescriptor
+ );
+
+ //
+ // XAiProject ...
+ aiProjectDescriptor = typeof(XAiModelsHelper)
+ .InvokeGenericMethod(
+ args: null,
+ runtimeType: contextType,
+ methodName: XAiModelsConstants.GetXAiProjectEFRepositoryDescriptor
+ );
+
+ //
+ // XAiConversation ...
+ aiConversationDescriptor = typeof(XAiModelsHelper)
+ .InvokeGenericMethod(
+ args: null,
+ runtimeType: contextType,
+ methodName: XAiModelsConstants.GetXAiConversationEFRepositoryDescriptor
+ );
+ break;
+
+ //
+ case XRepositoryType.Mongo:
+ //
+ // XAiMessage ...
+ aiMessageDescriptor = XAiModelsHelper.GetXAiMessageMongoRepositoryDescriptor();
+
+ //
+ // XAiProject ...
+ aiProjectDescriptor = XAiModelsHelper.GetXAiProjectMongoRepositoryDescriptor();
+
+ //
+ // XAiConversation ...
+ aiConversationDescriptor = XAiModelsHelper.GetXAiConversationMongoRepositoryDescriptor();
+ break;
+
+ //
+ case XRepositoryType.InMemory:
+ //
+ // XAiMessage ...
+ aiMessageDescriptor = XAiModelsHelper.GetXAiMessageInMemoryRepositoryDescriptor();
+
+ //
+ // XAiProject ...
+ aiProjectDescriptor = XAiModelsHelper.GetXAiProjectInMemoryRepositoryDescriptor();
+
+ //
+ // XAiConversation ...
+ aiConversationDescriptor = XAiModelsHelper.GetXAiConversationInMemoryRepositoryDescriptor();
+ break;
+ }
+
+ //
+ #region Register Repository Descriptor ...
+ //
+ // XAiMessage ...
+ if (!aiMessageDescriptor.IsNull())
+ {
+ //
+ services.AddXRepository(
+ lifeTime: lifeTime,
+ descriptor: aiMessageDescriptor
+ );
+ }
+
+ //
+ // XAiProject ...
+ if (!aiProjectDescriptor.IsNull())
+ {
+ //
+ services.AddXRepository(
+ lifeTime: lifeTime,
+ descriptor: aiProjectDescriptor
+ );
+ }
+
+ //
+ // XAiConversation ...
+ if (!aiConversationDescriptor.IsNull())
+ {
+ //
+ services.AddXRepository(
+ lifeTime: lifeTime,
+ descriptor: aiConversationDescriptor
+ );
+ }
+ #endregion
+
+ //
+ #region Register Services ...
+ //
+ #region AiMessage ...
+ //
+ // Models ...
+ services.Add(
+ new ServiceDescriptor(typeof(IXAiMessageServiceProvider), typeof(XAiMessageServiceProvider), lifeTime)
+ );
+ services.Add(
+ new ServiceDescriptor(typeof(IXAiMessageRepositoryService), typeof(XAiMessageRepositoryService), lifeTime)
+ );
+ services.Add(
+ new ServiceDescriptor(typeof(IXAiMessageRepositoryProvider), typeof(XAiMessageRepositoryProvider), lifeTime)
+ );
+ #endregion
+
+ //
+ #region AiProject ...
+ //
+ // Models ...
+ services.Add(
+ new ServiceDescriptor(typeof(IXAiProjectServiceProvider), typeof(XAiProjectServiceProvider), lifeTime)
+ );
+ services.Add(
+ new ServiceDescriptor(typeof(IXAiProjectRepositoryService), typeof(XAiProjectRepositoryService), lifeTime)
+ );
+ services.Add(
+ new ServiceDescriptor(typeof(IXAiProjectRepositoryProvider), typeof(XAiProjectRepositoryProvider), lifeTime)
+ );
+
+ //
+ // Resource Providers ...
+ services.Add(
+ new ServiceDescriptor(typeof(IXAiProjectTitleResourceProvider), typeof(XAiProjectTitleResourceProvider), lifeTime)
+ );
+ services.Add(
+ new ServiceDescriptor(typeof(IXAiProjectDescriptionResourceProvider), typeof(XAiProjectDescriptionResourceProvider), lifeTime)
+ );
+ #endregion
+
+ //
+ #region AiConversation ...
+ //
+ // Models ...
+ services.Add(
+ new ServiceDescriptor(typeof(IXAiConversationServiceProvider), typeof(XAiConversationServiceProvider), lifeTime)
+ );
+ services.Add(
+ new ServiceDescriptor(typeof(IXAiConversationRepositoryService), typeof(XAiConversationRepositoryService), lifeTime)
+ );
+ services.Add(
+ new ServiceDescriptor(typeof(IXAiConversationRepositoryProvider), typeof(XAiConversationRepositoryProvider), lifeTime)
+ );
+
+ //
+ // Resource Providers ...
+ services.Add(
+ new ServiceDescriptor(typeof(IXAiConversationTitleResourceProvider), typeof(XAiConversationTitleResourceProvider), lifeTime)
+ );
+ #endregion
+ #endregion
+
+ //
+ Log("Service Regitration Succeed ...");
+ }
+ #endregion
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Extensions\ChatResponseExtensions.cs
+
+using Microsoft.Extensions.AI;
+using xCommons.Extensions;
+
+namespace xAiModels.Extensions
+{
+ public static class ChatResponseExtensions
+ {
+ ///
+ /// Validate a Chat Response ...
+ ///
+ ///
+ ///
+ public static bool IsValid(this ChatResponse source)
+ {
+ //
+ var result =
+ source is not null &&
+ !source.IsNullOrDefault() &&
+ !string.IsNullOrWhiteSpace(source.Text) &&
+ source.FinishReason == ChatFinishReason.Stop;
+
+ //
+ return result;
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Extensions\ChatRoleExtensions.cs
+
+using Microsoft.Extensions.AI;
+using xAiModels.Constants;
+using xCommons.Extensions;
+
+namespace xAiModels.Extensions
+{
+ ///
+ /// Extensions for ChatRole ...
+ ///
+ public static class ChatRoleExtensions
+ {
+ ///
+ /// Normalize an String to Propper Chat Role Value ...
+ /// >
+ ///
+ ///
+ ///
+ public static string GetChatRoleTitle(this string source)
+ {
+ //
+ var result = XAiChatRoles.None;
+
+ //
+ if (source.ToNormalString() == XAiChatRoles.None.ToNormalString())
+ {
+ result = XAiChatRoles.None;
+ }
+ else if (source.ToNormalString() == XAiChatRoles.User.ToNormalString())
+ {
+ result = XAiChatRoles.User;
+ }
+ else if (source.ToNormalString() == XAiChatRoles.Tool.ToNormalString())
+ {
+ result = XAiChatRoles.Tool;
+ }
+ else if (source.ToNormalString() == XAiChatRoles.System.ToNormalString())
+ {
+ result = XAiChatRoles.System;
+ }
+ else if (source.ToNormalString() == XAiChatRoles.Assistant.ToNormalString())
+ {
+ result = XAiChatRoles.Assistant;
+ }
+
+ //
+ return result;
+ }
+
+ ///
+ /// Get Chat Role Title from Chat Role Class ...
+ ///
+ ///
+ ///
+ ///
+ public static string GetRole(this ChatRole source)
+ {
+ //
+ var result = source.Value
+ .GetChatRoleTitle();
+
+ //
+ return result;
+ }
+
+ ///
+ /// Generate Chat Role Class Based on role Title ...
+ ///
+ ///
+ ///
+ public static ChatRole ToChatRole(this string source)
+ {
+ //
+ var role = source.GetChatRoleTitle();
+ ChatRole result = new ChatRole(role);
+
+ //
+ return result;
+ }
+
+ ///
+ /// Generate Chat Role Class Based on role Title ...
+ ///
+ ///
+ ///
+ public static ChatRole ToChatRole(this XAiChatRole source)
+ {
+ //
+ var role = source.GetStringValue();
+ ChatRole result = new ChatRole(role);
+
+ //
+ return result;
+ }
+
+ ///
+ /// Extract Chat Role Enum from Chat Role ...
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static XAiChatRole ToChatRole(this ChatRole source)
+ {
+ //
+ var role = source
+ .GetRole()
+ .GetChatRoleTitle();
+
+ //
+ XAiChatRole result = XAiChatRole.User;
+
+ //
+ if (role == XAiChatRoles.User)
+ {
+ result = XAiChatRole.User;
+ }
+ else if (role == XAiChatRoles.Tool)
+ {
+ result = XAiChatRole.Tool;
+ }
+ else if (role == XAiChatRoles.System)
+ {
+ result = XAiChatRole.System;
+ }
+ else if (role == XAiChatRoles.Assistant)
+ {
+ result = XAiChatRole.Assistant;
+ }
+
+ //
+ return result;
+ }
+
+ ///
+ /// Validate an String as Chat Role ...
+ ///
+ ///
+ ///
+ public static bool IsValid(this string source)
+ {
+ //
+ var result =
+ source != XAiChatRoles.None &&
+ source.ToNormalString() != XAiChatRoles.None.ToNormalString();
+
+ //
+ return result;
+ }
+
+ ///
+ /// Validate Role ...
+ /// >
+ ///
+ ///
+ ///
+ public static bool IsValid(this XAiChatRole source)
+ {
+ //
+ var result = source != XAiChatRole.None;
+ return result;
+ }
+
+ ///
+ /// Validate Role ...
+ /// >
+ ///
+ ///
+ ///
+ public static bool IsValid(this ChatRole source)
+ {
+ //
+ var role = source.ToChatRole();
+ var result = role.IsValid();
+ return result;
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Extensions\XAiApiConfigurationExtensions.cs
+
+using System.Linq;
+using xAiModels.Configurations;
+using xAiModels.Models;
+using xCommons.Extensions;
+
+namespace xAiModels.Extensions
+{
+ public static class XAiApiConfigurationExtensions
+ {
+ ///
+ /// Validate Api Configuration ...
+ ///
+ ///
+ ///
+ public static bool IsValid(this XAiApiConfiguration source)
+ {
+ return
+ !source.IsNullOrDefault() &&
+ source.Models.HasChild();
+ }
+
+ ///
+ /// Retrieve Default Model Descriptor ...
+ ///
+ ///
+ ///
+ public static XAiModelDescriptor GetDefaultModel(this XAiApiConfiguration source)
+ {
+ //
+ XAiModelDescriptor result = null;
+
+ //
+ if (source.IsValid())
+ {
+ result = source.Models.First();
+ }
+
+ //
+ return result;
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Helpers\XAiModelsHelper.cs
+
+using System;
+using GraphQL.Types;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xAiModels.Providers.Entities;
+using xAiModels.Providers.GraphQL;
+using xDataService.Db;
+using xDataService.Models;
+using xDataService.Providers;
+
+namespace xAiModels.Helpers
+{
+ public static class XAiModelsHelper
+ {
+ //
+ #region XAiConversation ...
+ //
+ #region EF Repository Descriptor Provider(s) ...
+ public static XEFRepositoryDescriptor<
+ XAiConversation,
+ Guid,
+ IXAiConversationKeyGenerator,
+ XAiConversationKeyGenerator,
+ IXAiConversationRepositoryEvents,
+ XAiConversationRepositoryEvents,
+ XAiConversationGraphType,
+ GuidGraphType,
+ XAiConversationGraphQuery,
+ IXAiConversationGraphQLTypeHelper,
+ XAiConversationGraphQLTypeHelper,
+ XAiConversationGraphSchema,
+ IXAiConversationRepository,
+ XAiConversationEFRepository,
+ TContext
+ > GetXAiConversationEFRepositoryDescriptor()
+ where TContext : XDbContext
+ {
+ //
+ var result = new XEFRepositoryDescriptor<
+ XAiConversation,
+ Guid,
+ IXAiConversationKeyGenerator,
+ XAiConversationKeyGenerator,
+ IXAiConversationRepositoryEvents,
+ XAiConversationRepositoryEvents,
+ XAiConversationGraphType,
+ GuidGraphType,
+ XAiConversationGraphQuery,
+ IXAiConversationGraphQLTypeHelper,
+ XAiConversationGraphQLTypeHelper,
+ XAiConversationGraphSchema,
+ IXAiConversationRepository,
+ XAiConversationEFRepository,
+ TContext
+ >();
+
+ //
+ return result;
+ }
+
+ public static XEFRepositoryDescriptor<
+ XAiConversation,
+ Guid,
+ IXAiConversationKeyGenerator,
+ XAiConversationKeyGenerator,
+ IXAiConversationRepositoryEvents,
+ XAiConversationRepositoryEvents,
+ XAiConversationGraphType,
+ GuidGraphType,
+ XAiConversationGraphQuery,
+ IXAiConversationGraphQLTypeHelper,
+ XAiConversationGraphQLTypeHelper,
+ XAiConversationGraphSchema,
+ IXAiConversationRepository,
+ XAiConversationEFRepository,
+ TContext,
+ IXAiConversationSeeder,
+ TSeederImplementation
+ > GetXAiConversationEFRepositoryDescriptor()
+ where TContext : XDbContext
+ where TSeederImplementation : XBaseDbSeeder
+ {
+ //
+ var result = new XEFRepositoryDescriptor<
+ XAiConversation,
+ Guid,
+ IXAiConversationKeyGenerator,
+ XAiConversationKeyGenerator,
+ IXAiConversationRepositoryEvents,
+ XAiConversationRepositoryEvents,
+ XAiConversationGraphType,
+ GuidGraphType,
+ XAiConversationGraphQuery,
+ IXAiConversationGraphQLTypeHelper,
+ XAiConversationGraphQLTypeHelper,
+ XAiConversationGraphSchema,
+ IXAiConversationRepository,
+ XAiConversationEFRepository,
+ TContext,
+ IXAiConversationSeeder,
+ TSeederImplementation
+ >();
+
+ //
+ return result;
+ }
+ #endregion
+
+ //
+ #region Mongo Repository Descriptor Provider(s) ...
+ public static XMongoRepositoryDescriptor<
+ XAiConversation,
+ Guid,
+ IXAiConversationKeyGenerator,
+ XAiConversationKeyGenerator,
+ IXAiConversationRepositoryEvents,
+ XAiConversationRepositoryEvents,
+ XAiConversationGraphType,
+ GuidGraphType,
+ XAiConversationGraphQuery,
+ IXAiConversationGraphQLTypeHelper,
+ XAiConversationGraphQLTypeHelper,
+ XAiConversationGraphSchema,
+ IXAiConversationRepository,
+ XAiConversationMongoRepository
+ > GetXAiConversationMongoRepositoryDescriptor()
+ {
+ //
+ var result = new XMongoRepositoryDescriptor<
+ XAiConversation,
+ Guid,
+ IXAiConversationKeyGenerator,
+ XAiConversationKeyGenerator,
+ IXAiConversationRepositoryEvents,
+ XAiConversationRepositoryEvents,
+ XAiConversationGraphType,
+ GuidGraphType,
+ XAiConversationGraphQuery,
+ IXAiConversationGraphQLTypeHelper,
+ XAiConversationGraphQLTypeHelper,
+ XAiConversationGraphSchema,
+ IXAiConversationRepository,
+ XAiConversationMongoRepository
+ >();
+
+ //
+ return result;
+ }
+
+ public static XMongoRepositoryDescriptor<
+ XAiConversation,
+ Guid,
+ IXAiConversationKeyGenerator,
+ XAiConversationKeyGenerator,
+ IXAiConversationRepositoryEvents,
+ XAiConversationRepositoryEvents,
+ XAiConversationGraphType,
+ GuidGraphType,
+ XAiConversationGraphQuery,
+ IXAiConversationGraphQLTypeHelper,
+ XAiConversationGraphQLTypeHelper,
+ XAiConversationGraphSchema,
+ IXAiConversationRepository,
+ XAiConversationMongoRepository,
+ IXAiConversationSeeder,
+ TSeederImplementation
+ > GetXAiConversationMongoRepositoryDescriptor()
+ where TSeederImplementation : XBaseDbSeeder
+ {
+ //
+ var result = new XMongoRepositoryDescriptor<
+ XAiConversation,
+ Guid,
+ IXAiConversationKeyGenerator,
+ XAiConversationKeyGenerator,
+ IXAiConversationRepositoryEvents,
+ XAiConversationRepositoryEvents,
+ XAiConversationGraphType,
+ GuidGraphType,
+ XAiConversationGraphQuery,
+ IXAiConversationGraphQLTypeHelper,
+ XAiConversationGraphQLTypeHelper,
+ XAiConversationGraphSchema,
+ IXAiConversationRepository,
+ XAiConversationMongoRepository,
+ IXAiConversationSeeder,
+ TSeederImplementation
+ >();
+
+ //
+ return result;
+ }
+ #endregion
+
+ //
+ #region InMemory Repository Descriptor Provider(s) ...
+ public static XInMemoryRepositoryDescriptor<
+ XAiConversation,
+ Guid,
+ IXAiConversationKeyGenerator,
+ XAiConversationKeyGenerator,
+ IXAiConversationRepositoryEvents,
+ XAiConversationRepositoryEvents,
+ XAiConversationGraphType,
+ GuidGraphType,
+ XAiConversationGraphQuery,
+ IXAiConversationGraphQLTypeHelper,
+ XAiConversationGraphQLTypeHelper,
+ XAiConversationGraphSchema,
+ IXAiConversationRepository,
+ XAiConversationInMemoryRepository
+ > GetXAiConversationInMemoryRepositoryDescriptor()
+ {
+ //
+ var result = new XInMemoryRepositoryDescriptor<
+ XAiConversation,
+ Guid,
+ IXAiConversationKeyGenerator,
+ XAiConversationKeyGenerator,
+ IXAiConversationRepositoryEvents,
+ XAiConversationRepositoryEvents,
+ XAiConversationGraphType,
+ GuidGraphType,
+ XAiConversationGraphQuery,
+ IXAiConversationGraphQLTypeHelper,
+ XAiConversationGraphQLTypeHelper,
+ XAiConversationGraphSchema,
+ IXAiConversationRepository,
+ XAiConversationInMemoryRepository
+ >();
+
+ //
+ return result;
+ }
+
+ public static XInMemoryRepositoryDescriptor<
+ XAiConversation,
+ Guid,
+ IXAiConversationKeyGenerator,
+ XAiConversationKeyGenerator,
+ IXAiConversationRepositoryEvents,
+ XAiConversationRepositoryEvents,
+ XAiConversationGraphType,
+ GuidGraphType,
+ XAiConversationGraphQuery,
+ IXAiConversationGraphQLTypeHelper,
+ XAiConversationGraphQLTypeHelper,
+ XAiConversationGraphSchema,
+ IXAiConversationRepository,
+ XAiConversationInMemoryRepository,
+ IXAiConversationSeeder,
+ TSeederImplementation
+ > GetXAiConversationInMemoryRepositoryDescriptor()
+ where TSeederImplementation : XBaseDbSeeder
+ {
+ //
+ var result = new XInMemoryRepositoryDescriptor<
+ XAiConversation,
+ Guid,
+ IXAiConversationKeyGenerator,
+ XAiConversationKeyGenerator,
+ IXAiConversationRepositoryEvents,
+ XAiConversationRepositoryEvents,
+ XAiConversationGraphType,
+ GuidGraphType,
+ XAiConversationGraphQuery,
+ IXAiConversationGraphQLTypeHelper,
+ XAiConversationGraphQLTypeHelper,
+ XAiConversationGraphSchema,
+ IXAiConversationRepository,
+ XAiConversationInMemoryRepository,
+ IXAiConversationSeeder,
+ TSeederImplementation
+ >();
+
+ //
+ return result;
+ }
+ #endregion
+ #endregion
+
+ //
+ #region XAiMessage ...
+ //
+ #region EF Repository Descriptor Provider(s) ...
+ public static XEFRepositoryDescriptor<
+ XAiMessage,
+ Guid,
+ IXAiMessageKeyGenerator,
+ XAiMessageKeyGenerator,
+ IXAiMessageRepositoryEvents,
+ XAiMessageRepositoryEvents,
+ XAiMessageGraphType,
+ GuidGraphType,
+ XAiMessageGraphQuery,
+ IXAiMessageGraphQLTypeHelper,
+ XAiMessageGraphQLTypeHelper,
+ XAiMessageGraphSchema,
+ IXAiMessageRepository,
+ XAiMessageEFRepository,
+ TContext
+ > GetXAiMessageEFRepositoryDescriptor()
+ where TContext : XDbContext
+ {
+ //
+ var result = new XEFRepositoryDescriptor<
+ XAiMessage,
+ Guid,
+ IXAiMessageKeyGenerator,
+ XAiMessageKeyGenerator,
+ IXAiMessageRepositoryEvents,
+ XAiMessageRepositoryEvents,
+ XAiMessageGraphType,
+ GuidGraphType,
+ XAiMessageGraphQuery,
+ IXAiMessageGraphQLTypeHelper,
+ XAiMessageGraphQLTypeHelper,
+ XAiMessageGraphSchema,
+ IXAiMessageRepository,
+ XAiMessageEFRepository,
+ TContext
+ >();
+
+ //
+ return result;
+ }
+
+ public static XEFRepositoryDescriptor<
+ XAiMessage,
+ Guid,
+ IXAiMessageKeyGenerator,
+ XAiMessageKeyGenerator,
+ IXAiMessageRepositoryEvents,
+ XAiMessageRepositoryEvents,
+ XAiMessageGraphType,
+ GuidGraphType,
+ XAiMessageGraphQuery,
+ IXAiMessageGraphQLTypeHelper,
+ XAiMessageGraphQLTypeHelper,
+ XAiMessageGraphSchema,
+ IXAiMessageRepository,
+ XAiMessageEFRepository,
+ TContext,
+ IXAiMessageSeeder,
+ TSeederImplementation
+ > GetXAiMessageEFRepositoryDescriptor()
+ where TContext : XDbContext
+ where TSeederImplementation : XBaseDbSeeder
+ {
+ //
+ var result = new XEFRepositoryDescriptor<
+ XAiMessage,
+ Guid,
+ IXAiMessageKeyGenerator,
+ XAiMessageKeyGenerator,
+ IXAiMessageRepositoryEvents,
+ XAiMessageRepositoryEvents,
+ XAiMessageGraphType,
+ GuidGraphType,
+ XAiMessageGraphQuery,
+ IXAiMessageGraphQLTypeHelper,
+ XAiMessageGraphQLTypeHelper,
+ XAiMessageGraphSchema,
+ IXAiMessageRepository,
+ XAiMessageEFRepository,
+ TContext,
+ IXAiMessageSeeder,
+ TSeederImplementation
+ >();
+
+ //
+ return result;
+ }
+ #endregion
+
+ //
+ #region Mongo Repository Descriptor Provider(s) ...
+ public static XMongoRepositoryDescriptor<
+ XAiMessage,
+ Guid,
+ IXAiMessageKeyGenerator,
+ XAiMessageKeyGenerator,
+ IXAiMessageRepositoryEvents,
+ XAiMessageRepositoryEvents,
+ XAiMessageGraphType,
+ GuidGraphType,
+ XAiMessageGraphQuery,
+ IXAiMessageGraphQLTypeHelper,
+ XAiMessageGraphQLTypeHelper,
+ XAiMessageGraphSchema,
+ IXAiMessageRepository,
+ XAiMessageMongoRepository
+ > GetXAiMessageMongoRepositoryDescriptor()
+ {
+ //
+ var result = new XMongoRepositoryDescriptor<
+ XAiMessage,
+ Guid,
+ IXAiMessageKeyGenerator,
+ XAiMessageKeyGenerator,
+ IXAiMessageRepositoryEvents,
+ XAiMessageRepositoryEvents,
+ XAiMessageGraphType,
+ GuidGraphType,
+ XAiMessageGraphQuery,
+ IXAiMessageGraphQLTypeHelper,
+ XAiMessageGraphQLTypeHelper,
+ XAiMessageGraphSchema,
+ IXAiMessageRepository,
+ XAiMessageMongoRepository
+ >();
+
+ //
+ return result;
+ }
+
+ public static XMongoRepositoryDescriptor<
+ XAiMessage,
+ Guid,
+ IXAiMessageKeyGenerator,
+ XAiMessageKeyGenerator,
+ IXAiMessageRepositoryEvents,
+ XAiMessageRepositoryEvents,
+ XAiMessageGraphType,
+ GuidGraphType,
+ XAiMessageGraphQuery,
+ IXAiMessageGraphQLTypeHelper,
+ XAiMessageGraphQLTypeHelper,
+ XAiMessageGraphSchema,
+ IXAiMessageRepository,
+ XAiMessageMongoRepository,
+ IXAiMessageSeeder,
+ TSeederImplementation
+ > GetXAiMessageMongoRepositoryDescriptor()
+ where TSeederImplementation : XBaseDbSeeder
+ {
+ //
+ var result = new XMongoRepositoryDescriptor<
+ XAiMessage,
+ Guid,
+ IXAiMessageKeyGenerator,
+ XAiMessageKeyGenerator,
+ IXAiMessageRepositoryEvents,
+ XAiMessageRepositoryEvents,
+ XAiMessageGraphType,
+ GuidGraphType,
+ XAiMessageGraphQuery,
+ IXAiMessageGraphQLTypeHelper,
+ XAiMessageGraphQLTypeHelper,
+ XAiMessageGraphSchema,
+ IXAiMessageRepository,
+ XAiMessageMongoRepository,
+ IXAiMessageSeeder,
+ TSeederImplementation
+ >();
+
+ //
+ return result;
+ }
+ #endregion
+
+ //
+ #region InMemory Repository Descriptor Provider(s) ...
+ public static XInMemoryRepositoryDescriptor<
+ XAiMessage,
+ Guid,
+ IXAiMessageKeyGenerator,
+ XAiMessageKeyGenerator,
+ IXAiMessageRepositoryEvents,
+ XAiMessageRepositoryEvents,
+ XAiMessageGraphType,
+ GuidGraphType,
+ XAiMessageGraphQuery,
+ IXAiMessageGraphQLTypeHelper,
+ XAiMessageGraphQLTypeHelper,
+ XAiMessageGraphSchema,
+ IXAiMessageRepository,
+ XAiMessageInMemoryRepository
+ > GetXAiMessageInMemoryRepositoryDescriptor()
+ {
+ //
+ var result = new XInMemoryRepositoryDescriptor<
+ XAiMessage,
+ Guid,
+ IXAiMessageKeyGenerator,
+ XAiMessageKeyGenerator,
+ IXAiMessageRepositoryEvents,
+ XAiMessageRepositoryEvents,
+ XAiMessageGraphType,
+ GuidGraphType,
+ XAiMessageGraphQuery,
+ IXAiMessageGraphQLTypeHelper,
+ XAiMessageGraphQLTypeHelper,
+ XAiMessageGraphSchema,
+ IXAiMessageRepository,
+ XAiMessageInMemoryRepository
+ >();
+
+ //
+ return result;
+ }
+
+ public static XInMemoryRepositoryDescriptor<
+ XAiMessage,
+ Guid,
+ IXAiMessageKeyGenerator,
+ XAiMessageKeyGenerator,
+ IXAiMessageRepositoryEvents,
+ XAiMessageRepositoryEvents,
+ XAiMessageGraphType,
+ GuidGraphType,
+ XAiMessageGraphQuery,
+ IXAiMessageGraphQLTypeHelper,
+ XAiMessageGraphQLTypeHelper,
+ XAiMessageGraphSchema,
+ IXAiMessageRepository,
+ XAiMessageInMemoryRepository,
+ IXAiMessageSeeder,
+ TSeederImplementation
+ > GetXAiMessageInMemoryRepositoryDescriptor()
+ where TSeederImplementation : XBaseDbSeeder
+ {
+ //
+ var result = new XInMemoryRepositoryDescriptor<
+ XAiMessage,
+ Guid,
+ IXAiMessageKeyGenerator,
+ XAiMessageKeyGenerator,
+ IXAiMessageRepositoryEvents,
+ XAiMessageRepositoryEvents,
+ XAiMessageGraphType,
+ GuidGraphType,
+ XAiMessageGraphQuery,
+ IXAiMessageGraphQLTypeHelper,
+ XAiMessageGraphQLTypeHelper,
+ XAiMessageGraphSchema,
+ IXAiMessageRepository,
+ XAiMessageInMemoryRepository,
+ IXAiMessageSeeder,
+ TSeederImplementation
+ >();
+
+ //
+ return result;
+ }
+ #endregion
+ #endregion
+
+ //
+ #region XAiProject ...
+ //
+ #region EF Repository Descriptor Provider(s) ...
+ public static XEFRepositoryDescriptor<
+ XAiProject,
+ Guid,
+ IXAiProjectKeyGenerator,
+ XAiProjectKeyGenerator,
+ IXAiProjectRepositoryEvents,
+ XAiProjectRepositoryEvents,
+ XAiProjectGraphType,
+ GuidGraphType,
+ XAiProjectGraphQuery,
+ IXAiProjectGraphQLTypeHelper,
+ XAiProjectGraphQLTypeHelper,
+ XAiProjectGraphSchema,
+ IXAiProjectRepository,
+ XAiProjectEFRepository,
+ TContext
+ > GetXAiProjectEFRepositoryDescriptor()
+ where TContext : XDbContext
+ {
+ //
+ var result = new XEFRepositoryDescriptor<
+ XAiProject,
+ Guid,
+ IXAiProjectKeyGenerator,
+ XAiProjectKeyGenerator,
+ IXAiProjectRepositoryEvents,
+ XAiProjectRepositoryEvents,
+ XAiProjectGraphType,
+ GuidGraphType,
+ XAiProjectGraphQuery,
+ IXAiProjectGraphQLTypeHelper,
+ XAiProjectGraphQLTypeHelper,
+ XAiProjectGraphSchema,
+ IXAiProjectRepository,
+ XAiProjectEFRepository,
+ TContext
+ >();
+
+ //
+ return result;
+ }
+
+ public static XEFRepositoryDescriptor<
+ XAiProject,
+ Guid,
+ IXAiProjectKeyGenerator,
+ XAiProjectKeyGenerator,
+ IXAiProjectRepositoryEvents,
+ XAiProjectRepositoryEvents,
+ XAiProjectGraphType,
+ GuidGraphType,
+ XAiProjectGraphQuery,
+ IXAiProjectGraphQLTypeHelper,
+ XAiProjectGraphQLTypeHelper,
+ XAiProjectGraphSchema,
+ IXAiProjectRepository,
+ XAiProjectEFRepository,
+ TContext,
+ IXAiProjectSeeder,
+ TSeederImplementation
+ > GetXAiProjectEFRepositoryDescriptor()
+ where TContext : XDbContext
+ where TSeederImplementation : XBaseDbSeeder
+ {
+ //
+ var result = new XEFRepositoryDescriptor<
+ XAiProject,
+ Guid,
+ IXAiProjectKeyGenerator,
+ XAiProjectKeyGenerator,
+ IXAiProjectRepositoryEvents,
+ XAiProjectRepositoryEvents,
+ XAiProjectGraphType,
+ GuidGraphType,
+ XAiProjectGraphQuery,
+ IXAiProjectGraphQLTypeHelper,
+ XAiProjectGraphQLTypeHelper,
+ XAiProjectGraphSchema,
+ IXAiProjectRepository,
+ XAiProjectEFRepository,
+ TContext,
+ IXAiProjectSeeder,
+ TSeederImplementation
+ >();
+
+ //
+ return result;
+ }
+ #endregion
+
+ //
+ #region Mongo Repository Descriptor Provider(s) ...
+ public static XMongoRepositoryDescriptor<
+ XAiProject,
+ Guid,
+ IXAiProjectKeyGenerator,
+ XAiProjectKeyGenerator,
+ IXAiProjectRepositoryEvents,
+ XAiProjectRepositoryEvents,
+ XAiProjectGraphType,
+ GuidGraphType,
+ XAiProjectGraphQuery,
+ IXAiProjectGraphQLTypeHelper,
+ XAiProjectGraphQLTypeHelper,
+ XAiProjectGraphSchema,
+ IXAiProjectRepository,
+ XAiProjectMongoRepository
+ > GetXAiProjectMongoRepositoryDescriptor()
+ {
+ //
+ var result = new XMongoRepositoryDescriptor<
+ XAiProject,
+ Guid,
+ IXAiProjectKeyGenerator,
+ XAiProjectKeyGenerator,
+ IXAiProjectRepositoryEvents,
+ XAiProjectRepositoryEvents,
+ XAiProjectGraphType,
+ GuidGraphType,
+ XAiProjectGraphQuery,
+ IXAiProjectGraphQLTypeHelper,
+ XAiProjectGraphQLTypeHelper,
+ XAiProjectGraphSchema,
+ IXAiProjectRepository,
+ XAiProjectMongoRepository
+ >();
+
+ //
+ return result;
+ }
+
+ public static XMongoRepositoryDescriptor<
+ XAiProject,
+ Guid,
+ IXAiProjectKeyGenerator,
+ XAiProjectKeyGenerator,
+ IXAiProjectRepositoryEvents,
+ XAiProjectRepositoryEvents,
+ XAiProjectGraphType,
+ GuidGraphType,
+ XAiProjectGraphQuery,
+ IXAiProjectGraphQLTypeHelper,
+ XAiProjectGraphQLTypeHelper,
+ XAiProjectGraphSchema,
+ IXAiProjectRepository,
+ XAiProjectMongoRepository,
+ IXAiProjectSeeder,
+ TSeederImplementation
+ > GetXAiProjectMongoRepositoryDescriptor()
+ where TSeederImplementation : XBaseDbSeeder
+ {
+ //
+ var result = new XMongoRepositoryDescriptor<
+ XAiProject,
+ Guid,
+ IXAiProjectKeyGenerator,
+ XAiProjectKeyGenerator,
+ IXAiProjectRepositoryEvents,
+ XAiProjectRepositoryEvents,
+ XAiProjectGraphType,
+ GuidGraphType,
+ XAiProjectGraphQuery,
+ IXAiProjectGraphQLTypeHelper,
+ XAiProjectGraphQLTypeHelper,
+ XAiProjectGraphSchema,
+ IXAiProjectRepository,
+ XAiProjectMongoRepository,
+ IXAiProjectSeeder,
+ TSeederImplementation
+ >();
+
+ //
+ return result;
+ }
+ #endregion
+
+ //
+ #region InMemory Repository Descriptor Provider(s) ...
+ public static XInMemoryRepositoryDescriptor<
+ XAiProject,
+ Guid,
+ IXAiProjectKeyGenerator,
+ XAiProjectKeyGenerator,
+ IXAiProjectRepositoryEvents,
+ XAiProjectRepositoryEvents,
+ XAiProjectGraphType,
+ GuidGraphType,
+ XAiProjectGraphQuery,
+ IXAiProjectGraphQLTypeHelper,
+ XAiProjectGraphQLTypeHelper,
+ XAiProjectGraphSchema,
+ IXAiProjectRepository,
+ XAiProjectInMemoryRepository
+ > GetXAiProjectInMemoryRepositoryDescriptor()
+ {
+ //
+ var result = new XInMemoryRepositoryDescriptor<
+ XAiProject,
+ Guid,
+ IXAiProjectKeyGenerator,
+ XAiProjectKeyGenerator,
+ IXAiProjectRepositoryEvents,
+ XAiProjectRepositoryEvents,
+ XAiProjectGraphType,
+ GuidGraphType,
+ XAiProjectGraphQuery,
+ IXAiProjectGraphQLTypeHelper,
+ XAiProjectGraphQLTypeHelper,
+ XAiProjectGraphSchema,
+ IXAiProjectRepository,
+ XAiProjectInMemoryRepository
+ >();
+
+ //
+ return result;
+ }
+
+ public static XInMemoryRepositoryDescriptor<
+ XAiProject,
+ Guid,
+ IXAiProjectKeyGenerator,
+ XAiProjectKeyGenerator,
+ IXAiProjectRepositoryEvents,
+ XAiProjectRepositoryEvents,
+ XAiProjectGraphType,
+ GuidGraphType,
+ XAiProjectGraphQuery,
+ IXAiProjectGraphQLTypeHelper,
+ XAiProjectGraphQLTypeHelper,
+ XAiProjectGraphSchema,
+ IXAiProjectRepository,
+ XAiProjectInMemoryRepository,
+ IXAiProjectSeeder,
+ TSeederImplementation
+ > GetXAiProjectInMemoryRepositoryDescriptor()
+ where TSeederImplementation : XBaseDbSeeder
+ {
+ //
+ var result = new XInMemoryRepositoryDescriptor<
+ XAiProject,
+ Guid,
+ IXAiProjectKeyGenerator,
+ XAiProjectKeyGenerator,
+ IXAiProjectRepositoryEvents,
+ XAiProjectRepositoryEvents,
+ XAiProjectGraphType,
+ GuidGraphType,
+ XAiProjectGraphQuery,
+ IXAiProjectGraphQLTypeHelper,
+ XAiProjectGraphQLTypeHelper,
+ XAiProjectGraphSchema,
+ IXAiProjectRepository,
+ XAiProjectInMemoryRepository,
+ IXAiProjectSeeder,
+ TSeederImplementation
+ >();
+
+ //
+ return result;
+ }
+ #endregion
+ #endregion
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\IXAiConversationTitleResourceProvider.cs
+
+using xStringService.Interfaces;
+
+namespace xAiModels.Interfaces
+{
+ public interface IXAiConversationTitleResourceProvider : IXItemResourceProvider
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\IXAiDataProvider.cs
+
+namespace xAiModels.Interfaces
+{
+ ///
+ /// All Data Manipulation Requirements ...
+ ///
+ public interface IXAiDataProvider
+ {
+
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\IXAiProjectDescriptionResourceProvider.cs
+
+using xStringService.Interfaces;
+
+namespace xAiModels.Interfaces
+{
+ public interface IXAiProjectDescriptionResourceProvider : IXItemResourceProvider
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\IXAiProjectTitleResourceProvider.cs
+
+using xStringService.Interfaces;
+
+namespace xAiModels.Interfaces
+{
+ public interface IXAiProjectTitleResourceProvider : IXItemResourceProvider
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Dtos\IXAiConversationDtoHub.cs
+
+using System;
+using xAiModels.Models.Dtos;
+using xAiModels.Models.Entities;
+using xPushService.Interfaces;
+
+namespace xAiModels.Interfaces.Dtos
+{
+ public interface IXAiConversationDtoHub : IXBaseDtoHub
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Dtos\IXAiConversationRepositoryService.cs
+
+using System;
+using xAiModels.Models.Dtos;
+using xAiModels.Models.Entities;
+using xDataService.Interfaces;
+
+namespace xAiModels.Interfaces.Dtos
+{
+ public interface IXAiConversationRepositoryService : IXBaseRepositoryService
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Dtos\IXAiConversationServiceProvider.cs
+
+using System;
+using xAiModels.Models.Dtos;
+using xAiModels.Models.Entities;
+using xAiModels.Providers.Dtos;
+using xPushService.Interfaces;
+
+namespace xAiModels.Interfaces.Dtos
+{
+ public interface IXAiConversationServiceProvider : IXBaseDtoProvider
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Dtos\IXAiMessageDtoHub.cs
+
+using System;
+using xAiModels.Models.Dtos;
+using xAiModels.Models.Entities;
+using xPushService.Interfaces;
+
+namespace xAiModels.Interfaces.Dtos
+{
+ public interface IXAiMessageDtoHub : IXBaseDtoHub
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Dtos\IXAiMessageRepositoryService.cs
+
+using System;
+using xAiModels.Models.Dtos;
+using xAiModels.Models.Entities;
+using xDataService.Interfaces;
+
+namespace xAiModels.Interfaces.Dtos
+{
+ public interface IXAiMessageRepositoryService : IXBaseRepositoryService
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Dtos\IXAiMessageServiceProvider.cs
+
+using System;
+using xAiModels.Models.Dtos;
+using xAiModels.Models.Entities;
+using xAiModels.Providers.Dtos;
+using xPushService.Interfaces;
+
+namespace xAiModels.Interfaces.Dtos
+{
+ public interface IXAiMessageServiceProvider : IXBaseDtoProvider
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Dtos\IXAiProjectDtoHub.cs
+
+using System;
+using xAiModels.Models.Dtos;
+using xAiModels.Models.Entities;
+using xPushService.Interfaces;
+
+namespace xAiModels.Interfaces.Dtos
+{
+ public interface IXAiProjectDtoHub : IXBaseDtoHub
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Dtos\IXAiProjectRepositoryService.cs
+
+using System;
+using xAiModels.Models.Dtos;
+using xAiModels.Models.Entities;
+using xDataService.Interfaces;
+
+namespace xAiModels.Interfaces.Dtos
+{
+ public interface IXAiProjectRepositoryService : IXBaseRepositoryService
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Dtos\IXAiProjectServiceProvider.cs
+
+using System;
+using xAiModels.Models.Dtos;
+using xAiModels.Models.Entities;
+using xAiModels.Providers.Dtos;
+using xPushService.Interfaces;
+
+namespace xAiModels.Interfaces.Dtos
+{
+ public interface IXAiProjectServiceProvider : IXBaseDtoProvider
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Entities\IXAiConversationEntityHub.cs
+
+using System;
+using xAiModels.Models.Entities;
+using xPushService.Interfaces;
+
+namespace xAiModels.Interfaces.Entities
+{
+ public interface IXAiConversationEntityHub : IXBaseEntityHub
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Entities\IXAiConversationGraphQLTypeHelper.cs
+
+using System;
+using xAiModels.Models.Entities;
+using xDataService.Interfaces;
+
+namespace xAiModels.Interfaces.Entities
+{
+ public interface IXAiConversationGraphQLTypeHelper : IXBaseGraphQLTypeHelper
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Entities\IXAiConversationKeyGenerator.cs
+
+using System;
+using xAiModels.Models.Entities;
+using xDataService.Interfaces;
+
+namespace xAiModels.Interfaces.Entities
+{
+ public interface IXAiConversationKeyGenerator : IXKeyGenerator
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Entities\IXAiConversationRepository.cs
+
+using System;
+using xAiModels.Models.Entities;
+using xDataService.Interfaces;
+
+namespace xAiModels.Interfaces.Entities
+{
+ public interface IXAiConversationRepository : IXBaseRepository
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Entities\IXAiConversationRepositoryEvents.cs
+
+using xAiModels.Models.Entities;
+using xDataService.Interfaces;
+
+namespace xAiModels.Interfaces.Entities
+{
+ public interface IXAiConversationRepositoryEvents : IXBaseRepositoryEvents
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Entities\IXAiConversationRepositoryProvider.cs
+
+using System;
+using xAiModels.Models.Entities;
+using xAiModels.Providers.Entities;
+using xPushService.Interfaces;
+
+namespace xAiModels.Interfaces.Entities
+{
+ public interface IXAiConversationRepositoryProvider : IXBaseEntityProvider
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Entities\IXAiConversationSeeder.cs
+
+using System;
+using xAiModels.Models.Entities;
+using xDataService.Interfaces;
+
+namespace xAiModels.Interfaces.Entities
+{
+ public interface IXAiConversationSeeder : IXBaseDbSeeder
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Entities\IXAiMessageEntityHub.cs
+
+using System;
+using xAiModels.Models.Entities;
+using xPushService.Interfaces;
+
+namespace xAiModels.Interfaces.Entities
+{
+ public interface IXAiMessageEntityHub : IXBaseEntityHub
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Entities\IXAiMessageGraphQLTypeHelper.cs
+
+using System;
+using xAiModels.Models.Entities;
+using xDataService.Interfaces;
+
+namespace xAiModels.Interfaces.Entities
+{
+ public interface IXAiMessageGraphQLTypeHelper : IXBaseGraphQLTypeHelper
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Entities\IXAiMessageKeyGenerator.cs
+
+using System;
+using xAiModels.Models.Entities;
+using xDataService.Interfaces;
+
+namespace xAiModels.Interfaces.Entities
+{
+ public interface IXAiMessageKeyGenerator : IXKeyGenerator
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Entities\IXAiMessageRepository.cs
+
+using System;
+using xAiModels.Models.Entities;
+using xDataService.Interfaces;
+
+namespace xAiModels.Interfaces.Entities
+{
+ public interface IXAiMessageRepository : IXBaseRepository
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Entities\IXAiMessageRepositoryEvents.cs
+
+using xAiModels.Models.Entities;
+using xDataService.Interfaces;
+
+namespace xAiModels.Interfaces.Entities
+{
+ public interface IXAiMessageRepositoryEvents : IXBaseRepositoryEvents
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Entities\IXAiMessageRepositoryProvider.cs
+
+using System;
+using xAiModels.Models.Entities;
+using xAiModels.Providers.Entities;
+using xPushService.Interfaces;
+
+namespace xAiModels.Interfaces.Entities
+{
+ public interface IXAiMessageRepositoryProvider : IXBaseEntityProvider
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Entities\IXAiMessageSeeder.cs
+
+using System;
+using xAiModels.Models.Entities;
+using xDataService.Interfaces;
+
+namespace xAiModels.Interfaces.Entities
+{
+ public interface IXAiMessageSeeder : IXBaseDbSeeder
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Entities\IXAiProjectEntityHub.cs
+
+using System;
+using xAiModels.Models.Entities;
+using xPushService.Interfaces;
+
+namespace xAiModels.Interfaces.Entities
+{
+ public interface IXAiProjectEntityHub : IXBaseEntityHub
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Entities\IXAiProjectGraphQLTypeHelper.cs
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using xAiModels.Models.Entities;
+using xDataService.Interfaces;
+
+namespace xAiModels.Interfaces.Entities
+{
+ public interface IXAiProjectGraphQLTypeHelper : IXBaseGraphQLTypeHelper
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Entities\IXAiProjectKeyGenerator.cs
+
+using System;
+using xAiModels.Models.Entities;
+using xDataService.Interfaces;
+
+namespace xAiModels.Interfaces.Entities
+{
+ public interface IXAiProjectKeyGenerator : IXKeyGenerator
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Entities\IXAiProjectRepository.cs
+
+using System;
+using xAiModels.Models.Entities;
+using xDataService.Interfaces;
+
+namespace xAiModels.Interfaces.Entities
+{
+ public interface IXAiProjectRepository : IXBaseRepository
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Entities\IXAiProjectRepositoryEvents.cs
+
+using xAiModels.Models.Entities;
+using xDataService.Interfaces;
+
+namespace xAiModels.Interfaces.Entities
+{
+ public interface IXAiProjectRepositoryEvents : IXBaseRepositoryEvents
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Entities\IXAiProjectRepositoryProvider.cs
+
+using System;
+using xAiModels.Models.Entities;
+using xAiModels.Providers.Entities;
+using xPushService.Interfaces;
+
+namespace xAiModels.Interfaces.Entities
+{
+ public interface IXAiProjectRepositoryProvider : IXBaseEntityProvider
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Interfaces\Entities\IXAiProjectSeeder.cs
+
+using System;
+using xAiModels.Models.Entities;
+using xDataService.Interfaces;
+
+namespace xAiModels.Interfaces.Entities
+{
+ public interface IXAiProjectSeeder : IXBaseDbSeeder
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Models\XAiModelDescriptor.cs
+
+using xAiModels.Constants;
+
+namespace xAiModels.Models
+{
+ ///
+ /// Describe a Provided Model ...
+ ///
+ public class XAiModelDescriptor
+ {
+ ///
+ /// Provider Name ...
+ ///
+ public string Name { get; set; }
+
+ ///
+ /// LLM Provider Url ...
+ ///
+ public string Url { get; set; }
+
+ ///
+ /// Model Name ...
+ ///
+ public string LLM { get; set; }
+
+ ///
+ /// Api Key for Connection ...
+ ///
+ public string ApiKey { get; set; }
+
+ ///
+ /// Specified Model Provider Type ...
+ ///
+ public XAiModelProviderType Provider { get; set; } = XAiModelProviderType.Ollama;
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Models\Dtos\XAiConversationDto.cs
+
+using System;
+using xModels.Base;
+using xModels.Dtos;
+
+namespace xAiModels.Models.Dtos
+{
+ ///
+ /// Conversation Describe ...
+ ///
+ public class XAiConversationDto : XBaseGuidIDEntityDto
+ {
+ ///
+ /// User Identifier ...
+ ///
+ ///
+ public string OwnerId { get; set; }
+
+ ///
+ /// Owner Info ...
+ ///
+ public virtual XPersonDto Owner { get; set; } = null;
+
+ ///
+ /// Conversation Title Resource ID ...
+ ///
+ public string Title { get; set; }
+
+ ///
+ /// All Exists Title Locale Resources ...
+ ///
+ public virtual XLocaleResourceDto[] TitleLocales { get; set; }
+
+ ///
+ /// Created Time ...
+ ///
+ public DateTime CreatedOn { get; set; }
+
+ ///
+ /// Updated Time ...
+ ///
+ public DateTime UpdatedAt { get; set; }
+
+ ///
+ /// Project ID ...
+ ///
+ public Guid ProjectId { get; set; }
+
+ ///
+ /// Project Title Resource ID ...
+ ///
+ public virtual string ProjectTitle { get; set; } = null;
+
+ ///
+ /// Project Description Resource ID ...
+ ///
+ public virtual string ProjectDescription { get; set; } = null;
+
+ ///
+ /// Project Title Locale Resources ...
+ ///
+ public virtual XLocaleResourceDto[] ProjectTitleLocales { get; set; }
+
+ ///
+ /// Project Description Locale Resources ...
+ ///
+ public virtual XLocaleResourceDto[] ProjectDescriptionLocales { get; set; }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Models\Dtos\XAiMessageDto.cs
+
+using System;
+using System.Collections.Generic;
+using xAiModels.Constants;
+using xCommons.Extensions;
+using xModels.Base;
+using xModels.Dtos;
+
+namespace xAiModels.Models.Dtos
+{
+ public class XAiMessageDto : XBaseGuidIDEntityDto
+ {
+ ///
+ /// User Identifier ...
+ ///
+ ///
+ public string OwnerId { get; set; }
+
+ ///
+ /// Owner Info ...
+ ///
+ public virtual XPersonDto Owner { get; set; } = null;
+
+ ///
+ /// Message of Chat ...
+ ///
+ public string Content { get; set; }
+
+ ///
+ /// Role of Message ...
+ ///
+ public XAiChatRole Role { get; set; }
+
+ ///
+ /// Created Time ...
+ ///
+ public DateTime CreatedOn { get; set; }
+
+ ///
+ /// Updated Time ...
+ ///
+ public DateTime UpdatedAt { get; set; }
+
+ ///
+ /// Conversation Id ...
+ ///
+ public Guid ConversationId { get; set; }
+
+ ///
+ /// Conversation Info ...
+ ///
+ public virtual XAiConversationDto Conversation { get; set; } = null;
+
+ //
+ #region Meta Data Property ...
+ private string _metadata;
+
+ ///
+ /// Meta Data of Message ...
+ ///
+ public IDictionary Metadata { get; private set; } = null;
+
+ ///
+ /// Meta Data of MEssage in Json ...
+ ///
+ public string MeatDatas
+ {
+ //
+ get => _metadata;
+
+ //
+ set
+ {
+ //
+ // Converts Json String to Dictionary ...
+ if (!value.IsNullOrEmpty())
+ {
+ Metadata = value.FromJSON>();
+ }
+
+ //
+ _metadata = value;
+ }
+ }
+ #endregion
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Models\Dtos\XAiProjectDto.cs
+
+using System;
+using System.Collections.Generic;
+using xModels.Base;
+using xModels.Dtos;
+
+namespace xAiModels.Models.Dtos
+{
+ ///
+ /// Describe a Project ...
+ ///
+ public class XAiProjectDto : XBaseGuidIDEntityDto
+ {
+ ///
+ /// User Identifier ...
+ ///
+ ///
+ public string OwnerId { get; set; }
+
+ ///
+ /// Owner Info ...
+ ///
+ public virtual XPersonDto Owner { get; set; } = null;
+
+ ///
+ /// Title of Project ...
+ ///
+ public string Title { get; set; }
+
+ ///
+ /// All Exists Title Locale Resources ...
+ ///
+ public virtual XLocaleResourceDto[] TitleLocales { get; set; }
+
+ ///
+ /// Description of Project ...
+ ///
+ public string Description { get; set; }
+
+ ///
+ /// All Exists Description Locale Resources ...
+ ///
+ public virtual XLocaleResourceDto[] DescriptionLocales { get; set; }
+
+ ///
+ /// a Prompt for Project Start ...
+ ///
+ public string Prompt { get; set; }
+
+ ///
+ /// Created Time ...
+ ///
+ public DateTime CreatedOn { get; set; }
+
+ ///
+ /// Updated Time ...
+ ///
+ public DateTime UpdatedAt { get; set; }
+
+ ///
+ /// Conversations ...
+ ///
+ public virtual IList Conversations { get; set; } = [];
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Models\Entities\XAiConversation.cs
+
+using System;
+using System.ComponentModel.DataAnnotations;
+using xModels.Base;
+
+namespace xAiModels.Models.Entities
+{
+ ///
+ /// Conversation Describe ...
+ ///
+ public class XAiConversation : XBaseGuidIDEntity
+ {
+ ///
+ /// User Identifier ...
+ ///
+ ///
+ [Required]
+ [StringLength(255)]
+ public string OwnerId { get; set; }
+
+ ///
+ /// Title of Conversation ...
+ ///
+ [Required]
+ [StringLength(255)]
+ public string Title { get; set; }
+
+ ///
+ /// Created Time ...
+ ///
+ public DateTime CreatedOn { get; set; }
+
+ ///
+ /// Updated Time ...
+ ///
+ public DateTime UpdatedAt { get; set; }
+
+ ///
+ /// Project ID ...
+ ///
+ [Required]
+ public Guid ProjectId { get; set; }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Models\Entities\XAiMessage.cs
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using xAiModels.Constants;
+using xCommons.Extensions;
+using xModels.Base;
+
+namespace xAiModels.Models.Entities
+{
+ ///
+ /// Message Model of Ai ...
+ ///
+ public class XAiMessage : XBaseGuidIDEntity
+ {
+ ///
+ /// User Identifier ...
+ ///
+ ///
+ [Required]
+ [StringLength(255)]
+ public string OwnerId { get; set; }
+
+ ///
+ /// Message of Chat ...
+ ///
+ [Required]
+ public string Content { get; set; }
+
+ ///
+ /// Role of Message ...
+ ///
+ public XAiChatRole Role { get; set; }
+
+ ///
+ /// Created Time ...
+ ///
+ public DateTime CreatedOn { get; set; }
+
+ ///
+ /// Updated Time ...
+ ///
+ public DateTime UpdatedAt { get; set; }
+
+ ///
+ /// Conversation Id ...
+ ///
+ [StringLength(255)]
+ public Guid ConversationId { get; set; }
+
+ //
+ #region Meta Data Property ...
+ private string _metadata;
+
+ ///
+ /// Meta Data of Message ...
+ ///
+ [NotMapped]
+ public IDictionary Metadata { get; private set; } = null;
+
+ ///
+ /// Meta Data of MEssage in Json ...
+ ///
+ public string MeatDatas
+ {
+ //
+ get => _metadata;
+
+ //
+ set
+ {
+ //
+ // Converts Json String to Dictionary ...
+ if (!value.IsNullOrEmpty())
+ {
+ Metadata = value.FromJSON>();
+ }
+
+ //
+ _metadata = value;
+ }
+ }
+ #endregion
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Models\Entities\XAiProject.cs
+
+using System;
+using System.ComponentModel.DataAnnotations;
+using xModels.Base;
+
+namespace xAiModels.Models.Entities
+{
+ ///
+ /// Describe a Project ...
+ ///
+ public class XAiProject : XBaseGuidIDEntity
+ {
+ ///
+ /// User Identifier ...
+ ///
+ ///
+ [Required]
+ [StringLength(255)]
+ public string OwnerId { get; set; }
+
+ ///
+ /// Title of Project ...
+ ///
+ [Required]
+ [StringLength(255)]
+ public string Title { get; set; }
+
+ ///
+ /// Description of Project ...
+ ///
+ [StringLength(1000)]
+ public string Description { get; set; }
+
+ ///
+ /// a Prompt for Project Start ...
+ ///
+ public string Prompt { get; set; }
+
+ ///
+ /// Created Time ...
+ ///
+ public DateTime CreatedOn { get; set; }
+
+ ///
+ /// Updated Time ...
+ ///
+ public DateTime UpdatedAt { get; set; }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\XAiConversationEntityRegisterar.cs
+
+using System;
+using Microsoft.EntityFrameworkCore;
+using xAiModels.Configurations.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Interfaces;
+using xDataService.Providers;
+
+namespace xAiModels.Providers
+{
+ public class XAiConversationEntityRegisterar : XBaseEntityRegisterar, IXEntityRegisterar
+ {
+ public XAiConversationEntityRegisterar()
+ : base(nameof(XAiConversationEntityRegisterar))
+ {
+ //
+ // Add Entity ...
+ AddEntity();
+ }
+
+ ///
+ /// Configure Entities ...
+ ///
+ ///
+ public override void ConfigureEntities(ModelBuilder modelBuilder)
+ {
+ //
+ // Configure Entity Using Provided ...
+ modelBuilder
+ .ApplyConfigurationsFromAssembly(typeof(XAiConversationEntityConfiguration).Assembly);
+
+ //
+ base.ConfigureEntities(modelBuilder);
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\XAiConversationTitleResourceProvider.cs
+
+using xAiModels.Constants;
+using xAiModels.Interfaces;
+using xStringService.Interfaces.Dtos;
+using xStringService.Providers;
+
+namespace xAiModels.Providers
+{
+ public class XAiConversationTitleResourceProvider : XBaseItemResourceProvider, IXAiConversationTitleResourceProvider
+ {
+ public XAiConversationTitleResourceProvider(
+ IXStringServiceProvider stringProvider
+ ) : base(
+ stringProvider: stringProvider,
+ item: XAiModelsConstants.XAiConversationTitleIdentifier
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\XAiDataProvider.cs
+
+using Microsoft.AspNetCore.SignalR;
+using xAiModels.Interfaces;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Providers.Dtos;
+using xAiModels.Providers.Entities;
+
+namespace xAiModels.Providers
+{
+ ///
+ /// All Data Manipulation Requirements ...
+ ///
+ public class XAiDataProvider : IXAiDataProvider
+ {
+ private readonly IHubContext messageDtoHub;
+ private readonly IHubContext projectDtoHub;
+ private readonly IXAiMessageRepository messageRepositoryService;
+ private readonly IXAiProjectRepository projectRepositoryService;
+ private readonly IHubContext messageEntityHub;
+ private readonly IHubContext projectEntityHub;
+ private readonly IXAiConversationRepository conversationRepository;
+ private readonly IHubContext conversationDtoHub;
+ private readonly IHubContext conversationEntityHub;
+ private readonly IXAiProjectTitleResourceProvider projectTitleResourceProvider;
+ private readonly IXAiConversationTitleResourceProvider conversationTitleResourceProvider;
+ private readonly IXAiProjectDescriptionResourceProvider projectDescriptionResourceProvider;
+
+ public XAiDataProvider(
+ IHubContext messageDtoHub,
+ IHubContext projectDtoHub,
+ IXAiMessageRepository messageRepositoryService,
+ IXAiProjectRepository projectRepositoryService,
+ IHubContext messageEntityHub,
+ IHubContext projectEntityHub,
+ IXAiConversationRepository conversationRepository,
+ IHubContext conversationDtoHub,
+ IHubContext conversationEntityHub,
+ IXAiProjectTitleResourceProvider projectTitleResourceProvider,
+ IXAiConversationTitleResourceProvider conversationTitleResourceProvider,
+ IXAiProjectDescriptionResourceProvider projectDescriptionResourceProvider
+ )
+ {
+ this.messageDtoHub = messageDtoHub;
+ this.projectDtoHub = projectDtoHub;
+ this.projectEntityHub = projectEntityHub;
+ this.messageEntityHub = messageEntityHub;
+ this.conversationDtoHub = conversationDtoHub;
+ this.conversationEntityHub = conversationEntityHub;
+ this.conversationRepository = conversationRepository;
+ this.messageRepositoryService = messageRepositoryService;
+ this.projectRepositoryService = projectRepositoryService;
+ this.projectTitleResourceProvider = projectTitleResourceProvider;
+ this.conversationTitleResourceProvider = conversationTitleResourceProvider;
+ this.projectDescriptionResourceProvider = projectDescriptionResourceProvider;
+ }
+
+
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\XAiMessageEntityRegisterar.cs
+
+using System;
+using Microsoft.EntityFrameworkCore;
+using xAiModels.Configurations.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Interfaces;
+using xDataService.Providers;
+
+namespace xAiModels.Providers
+{
+ public class XAiMessageEntityRegisterar : XBaseEntityRegisterar, IXEntityRegisterar
+ {
+ public XAiMessageEntityRegisterar()
+ : base(nameof(XAiMessageEntityRegisterar))
+ {
+ //
+ // Add Entity ...
+ AddEntity();
+ }
+
+ ///
+ /// Configure Entities ...
+ ///
+ ///
+ public override void ConfigureEntities(ModelBuilder modelBuilder)
+ {
+ //
+ // Configure Entity Using Provided ...
+ modelBuilder
+ .ApplyConfigurationsFromAssembly(typeof(XAiMessageEntityConfiguration).Assembly);
+
+ //
+ base.ConfigureEntities(modelBuilder);
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\XAiProjectDescriptionResourceProvider.cs
+
+using xAiModels.Constants;
+using xAiModels.Interfaces;
+using xStringService.Interfaces.Dtos;
+using xStringService.Providers;
+
+namespace xAiModels.Providers
+{
+ public class XAiProjectDescriptionResourceProvider : XBaseItemResourceProvider, IXAiProjectDescriptionResourceProvider
+ {
+ public XAiProjectDescriptionResourceProvider(
+ IXStringServiceProvider stringProvider
+ ) : base(
+ stringProvider: stringProvider,
+ item: XAiModelsConstants.XAiProjectDescriptionIdentifier
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\XAiProjectEntityRegisterar.cs
+
+using System;
+using Microsoft.EntityFrameworkCore;
+using xAiModels.Configurations.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Interfaces;
+using xDataService.Providers;
+
+namespace xAiModels.Providers
+{
+ public class XAiProjectEntityRegisterar : XBaseEntityRegisterar, IXEntityRegisterar
+ {
+ public XAiProjectEntityRegisterar()
+ : base(nameof(XAiProjectEntityRegisterar))
+ {
+ //
+ // Add Entity ...
+ AddEntity();
+ }
+
+ ///
+ /// Configure Entities ...
+ ///
+ ///
+ public override void ConfigureEntities(ModelBuilder modelBuilder)
+ {
+ //
+ // Configure Entity Using Provided ...
+ modelBuilder
+ .ApplyConfigurationsFromAssembly(typeof(XAiProjectEntityConfiguration).Assembly);
+
+ //
+ base.ConfigureEntities(modelBuilder);
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\XAiProjectTitleResourceProvider.cs
+
+using xAiModels.Constants;
+using xAiModels.Interfaces;
+using xStringService.Interfaces.Dtos;
+using xStringService.Providers;
+
+namespace xAiModels.Providers
+{
+ public class XAiProjectTitleResourceProvider : XBaseItemResourceProvider, IXAiProjectTitleResourceProvider
+ {
+ public XAiProjectTitleResourceProvider(
+ IXStringServiceProvider stringProvider
+ ) : base(
+ stringProvider: stringProvider,
+ item: XAiModelsConstants.XAiProjectTitleIdentifier
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Dtos\XAiConversationDtoHub.cs
+
+using System;
+using Microsoft.Extensions.Logging;
+using xAiModels.Interfaces.Dtos;
+using xAiModels.Models.Dtos;
+using xAiModels.Models.Entities;
+using xPushService.Base;
+
+namespace xAiModels.Providers.Dtos
+{
+ public class XAiConversationDtoHub : XBaseDtoHub, IXAiConversationDtoHub
+ {
+ public XAiConversationDtoHub(
+ ILogger logger
+ ) : base(logger)
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Dtos\XAiConversationRepositoryService.cs
+
+using System;
+using System.Collections.Generic;
+using AutoMapper;
+using xAiModels.Interfaces.Dtos;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Dtos;
+using xAiModels.Models.Entities;
+using xDataService.Providers;
+
+namespace xAiModels.Providers.Dtos
+{
+ public class XAiConversationRepositoryService : XBaseRepositoryService, IXAiConversationRepositoryService
+ {
+ public XAiConversationRepositoryService(
+ IXAiConversationRepository repository,
+ IEnumerable mapperProfiles = null
+ ) : base(
+ repository,
+ mapperProfiles
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Dtos\XAiConversationServiceProvider.cs
+
+using System;
+using Microsoft.AspNetCore.SignalR;
+using xAiModels.Interfaces.Dtos;
+using xAiModels.Models.Dtos;
+using xAiModels.Models.Entities;
+using xDataService.Configuration;
+using xIdentityService.Interfaces;
+using xPushService.Base;
+
+namespace xAiModels.Providers.Dtos
+{
+ public class XAiConversationServiceProvider : XBaseDtoProvider, IXAiConversationServiceProvider
+ {
+ public XAiConversationServiceProvider(
+ IHubContext hub,
+ XDataServiceConfiguration dataConfiguration,
+ IXAiConversationRepositoryService service,
+ IXIdentityProvider identityProvider = null
+ ) : base(
+ hub,
+ dataConfiguration,
+ service,
+ identityProvider
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Dtos\XAiMessageDtoHub.cs
+
+using System;
+using Microsoft.Extensions.Logging;
+using xAiModels.Interfaces.Dtos;
+using xAiModels.Models.Dtos;
+using xAiModels.Models.Entities;
+using xPushService.Base;
+
+namespace xAiModels.Providers.Dtos
+{
+ public class XAiMessageDtoHub : XBaseDtoHub, IXAiMessageDtoHub
+ {
+ public XAiMessageDtoHub(
+ ILogger logger
+ ) : base(logger)
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Dtos\XAiMessageRepositoryService.cs
+
+using System;
+using System.Collections.Generic;
+using AutoMapper;
+using xAiModels.Interfaces.Dtos;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Dtos;
+using xAiModels.Models.Entities;
+using xDataService.Providers;
+
+namespace xAiModels.Providers.Dtos
+{
+ public class XAiMessageRepositoryService : XBaseRepositoryService, IXAiMessageRepositoryService
+ {
+ public XAiMessageRepositoryService(
+ IXAiMessageRepository repository,
+ IEnumerable mapperProfiles = null
+ ) : base(
+ repository,
+ mapperProfiles
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Dtos\XAiMessageServiceProvider.cs
+
+using System;
+using Microsoft.AspNetCore.SignalR;
+using xAiModels.Interfaces.Dtos;
+using xAiModels.Models.Dtos;
+using xAiModels.Models.Entities;
+using xDataService.Configuration;
+using xIdentityService.Interfaces;
+using xPushService.Base;
+
+namespace xAiModels.Providers.Dtos
+{
+ public class XAiMessageServiceProvider : XBaseDtoProvider, IXAiMessageServiceProvider
+ {
+ public XAiMessageServiceProvider(
+ IHubContext hub,
+ XDataServiceConfiguration dataConfiguration,
+ IXAiMessageRepositoryService service,
+ IXIdentityProvider identityProvider = null
+ ) : base(
+ hub,
+ dataConfiguration,
+ service,
+ identityProvider
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Dtos\XAiProjectDtoHub.cs
+
+using System;
+using Microsoft.Extensions.Logging;
+using xAiModels.Interfaces.Dtos;
+using xAiModels.Models.Dtos;
+using xAiModels.Models.Entities;
+using xPushService.Base;
+
+namespace xAiModels.Providers.Dtos
+{
+ public class XAiProjectDtoHub : XBaseDtoHub, IXAiProjectDtoHub
+ {
+ public XAiProjectDtoHub(
+ ILogger logger
+ ) : base(logger)
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Dtos\XAiProjectRepositoryService.cs
+
+using System;
+using System.Collections.Generic;
+using AutoMapper;
+using xAiModels.Interfaces.Dtos;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Dtos;
+using xAiModels.Models.Entities;
+using xDataService.Providers;
+
+namespace xAiModels.Providers.Dtos
+{
+ public class XAiProjectRepositoryService : XBaseRepositoryService, IXAiProjectRepositoryService
+ {
+ public XAiProjectRepositoryService(
+ IXAiProjectRepository repository,
+ IEnumerable mapperProfiles = null
+ ) : base(
+ repository,
+ mapperProfiles
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Dtos\XAiProjectServiceProvider.cs
+
+using System;
+using Microsoft.AspNetCore.SignalR;
+using xAiModels.Interfaces.Dtos;
+using xAiModels.Models.Dtos;
+using xAiModels.Models.Entities;
+using xDataService.Configuration;
+using xIdentityService.Interfaces;
+using xPushService.Base;
+
+namespace xAiModels.Providers.Dtos
+{
+ public class XAiProjectServiceProvider : XBaseDtoProvider, IXAiProjectServiceProvider
+ {
+ public XAiProjectServiceProvider(
+ IHubContext hub,
+ XDataServiceConfiguration dataConfiguration,
+ IXAiProjectRepositoryService service,
+ IXIdentityProvider identityProvider = null
+ ) : base(
+ hub,
+ dataConfiguration,
+ service,
+ identityProvider
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiConversationEFRepository.cs
+
+using System;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Configuration;
+using xDataService.Db;
+using xDataService.Interfaces;
+using xDataService.Providers;
+
+namespace xAiModels.Providers.Entities
+{
+ public class XAiConversationEFRepository : XBaseEFRepository, IXAiConversationRepository
+ where TContext : XDbContext
+ {
+ public XAiConversationEFRepository(
+ IXUnitOfWorks unitOfWorks,
+ XDataServiceConfiguration configuration,
+ IXAiConversationKeyGenerator keyGenerator = null,
+ IXAiConversationRepositoryEvents baseRepositoryEvents = null
+ ) : base(
+ unitOfWorks,
+ configuration,
+ keyGenerator,
+ baseRepositoryEvents
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiConversationEntityHub.cs
+
+using System;
+using Microsoft.Extensions.Logging;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xPushService.Base;
+
+namespace xAiModels.Providers.Entities
+{
+ public class XAiConversationEntityHub : XBaseEntityHub, IXAiConversationEntityHub
+ {
+ public XAiConversationEntityHub(
+ ILogger logger
+ ) : base(logger)
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiConversationInMemoryRepository.cs
+
+using System;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Configuration;
+using xDataService.Providers;
+
+namespace xAiModels.Providers.Entities
+{
+ public class XAiConversationInMemoryRepository : XBaseInMemoryRepository, IXAiConversationRepository
+ {
+ public XAiConversationInMemoryRepository(
+ XDataServiceConfiguration configuration,
+ IXAiConversationKeyGenerator keyGenerator = null,
+ IXAiConversationRepositoryEvents baseRepositoryEvents = null
+ ) : base(
+ configuration,
+ keyGenerator,
+ baseRepositoryEvents
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiConversationKeyGenerator.cs
+
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Providers;
+
+namespace xAiModels.Providers.Entities
+{
+ public class XAiConversationKeyGenerator : XGuidKeyGenerator, IXAiConversationKeyGenerator
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiConversationMongoRepository.cs
+
+using System;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Configuration;
+using xDataService.Providers;
+
+namespace xAiModels.Providers.Entities
+{
+ public class XAiConversationMongoRepository : XBaseMongoRepository, IXAiConversationRepository
+ {
+ public XAiConversationMongoRepository(
+ XDataBaseConfiguration dbConfiguration,
+ XDataServiceConfiguration configuration,
+ string collectionName = null,
+ IXAiConversationKeyGenerator keyGenerator = null,
+ IXAiConversationRepositoryEvents baseRepositoryEvents = null
+ ) : base(
+ dbConfiguration,
+ configuration,
+ collectionName,
+ keyGenerator,
+ baseRepositoryEvents
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiConversationRepositoryEvents.cs
+
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Providers;
+
+namespace xAiModels.Providers.Entities
+{
+ public class XAiConversationRepositoryEvents : XBaseRepositoryEvents, IXAiConversationRepositoryEvents
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiConversationRepositoryProvider.cs
+
+using System;
+using Microsoft.AspNetCore.SignalR;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Configuration;
+using xIdentityService.Interfaces;
+using xPushService.Base;
+
+namespace xAiModels.Providers.Entities
+{
+ public class XAiConversationRepositoryProvider : XBaseEntityProvider, IXAiConversationRepositoryProvider
+ {
+ public XAiConversationRepositoryProvider(
+ IHubContext hub,
+ IXAiConversationRepository repository,
+ XDataServiceConfiguration dataConfiguration,
+ IXIdentityProvider identityProvider = null
+ ) : base(
+ hub,
+ repository,
+ dataConfiguration,
+ identityProvider
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiConversationSeederBase.cs
+
+using System;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Configuration;
+using xDataService.Providers;
+
+namespace xAiModels.Providers.Entities
+{
+ public abstract class XAiConversationSeederBase : XBaseDbSeeder, IXAiConversationSeeder
+ {
+ protected XAiConversationSeederBase(
+ string entity,
+ string database,
+ IXAiConversationRepository repository,
+ XDataServiceConfiguration dataServiceConfiguration
+ ) : base(
+ entity,
+ database,
+ repository,
+ dataServiceConfiguration
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiMessageEFRepository.cs
+
+using System;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Configuration;
+using xDataService.Db;
+using xDataService.Interfaces;
+using xDataService.Providers;
+
+namespace xAiModels.Providers.Entities
+{
+ public class XAiMessageEFRepository : XBaseEFRepository, IXAiMessageRepository
+ where TContext : XDbContext
+ {
+ public XAiMessageEFRepository(
+ IXUnitOfWorks unitOfWorks,
+ XDataServiceConfiguration configuration,
+ IXAiMessageKeyGenerator keyGenerator = null,
+ IXAiMessageRepositoryEvents baseRepositoryEvents = null
+ ) : base(
+ unitOfWorks,
+ configuration,
+ keyGenerator,
+ baseRepositoryEvents
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiMessageEntityHub.cs
+
+using System;
+using Microsoft.Extensions.Logging;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xPushService.Base;
+
+namespace xAiModels.Providers.Entities
+{
+ public class XAiMessageEntityHub : XBaseEntityHub, IXAiMessageEntityHub
+ {
+ public XAiMessageEntityHub(
+ ILogger logger
+ ) : base(logger)
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiMessageInMemoryRepository.cs
+
+using System;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Configuration;
+using xDataService.Providers;
+
+namespace xAiModels.Providers.Entities
+{
+ public class XAiMessageInMemoryRepository : XBaseInMemoryRepository, IXAiMessageRepository
+ {
+ public XAiMessageInMemoryRepository(
+ XDataServiceConfiguration configuration,
+ IXAiMessageKeyGenerator keyGenerator = null,
+ IXAiMessageRepositoryEvents baseRepositoryEvents = null
+ ) : base(
+ configuration,
+ keyGenerator,
+ baseRepositoryEvents
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiMessageKeyGenerator.cs
+
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Providers;
+
+namespace xAiModels.Providers.Entities
+{
+ public class XAiMessageKeyGenerator : XGuidKeyGenerator, IXAiMessageKeyGenerator
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiMessageMongoRepository.cs
+
+using System;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Configuration;
+using xDataService.Providers;
+
+namespace xAiModels.Providers.Entities
+{
+ public class XAiMessageMongoRepository : XBaseMongoRepository, IXAiMessageRepository
+ {
+ public XAiMessageMongoRepository(
+ XDataBaseConfiguration dbConfiguration,
+ XDataServiceConfiguration configuration,
+ string collectionName = null,
+ IXAiMessageKeyGenerator keyGenerator = null,
+ IXAiMessageRepositoryEvents baseRepositoryEvents = null
+ ) : base(
+ dbConfiguration,
+ configuration,
+ collectionName,
+ keyGenerator,
+ baseRepositoryEvents
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiMessageRepositoryEvents.cs
+
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Providers;
+
+namespace xAiModels.Providers.Entities
+{
+ public class XAiMessageRepositoryEvents : XBaseRepositoryEvents, IXAiMessageRepositoryEvents
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiMessageRepositoryProvider.cs
+
+using System;
+using Microsoft.AspNetCore.SignalR;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Configuration;
+using xIdentityService.Interfaces;
+using xPushService.Base;
+
+namespace xAiModels.Providers.Entities
+{
+ public class XAiMessageRepositoryProvider : XBaseEntityProvider, IXAiMessageRepositoryProvider
+ {
+ public XAiMessageRepositoryProvider(
+ IHubContext hub,
+ IXAiMessageRepository repository,
+ XDataServiceConfiguration dataConfiguration,
+ IXIdentityProvider identityProvider = null
+ ) : base(
+ hub,
+ repository,
+ dataConfiguration,
+ identityProvider
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiMessageSeederBase.cs
+
+using System;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Configuration;
+using xDataService.Providers;
+
+namespace xAiModels.Providers.Entities
+{
+ public abstract class XAiMessageSeederBase : XBaseDbSeeder, IXAiMessageSeeder
+ {
+ protected XAiMessageSeederBase(
+ string entity,
+ string database,
+ IXAiMessageRepository repository,
+ XDataServiceConfiguration dataServiceConfiguration
+ ) : base(
+ entity,
+ database,
+ repository,
+ dataServiceConfiguration
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiProjectEFRepository.cs
+
+using System;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Configuration;
+using xDataService.Db;
+using xDataService.Interfaces;
+using xDataService.Providers;
+
+namespace xAiModels.Providers.Entities
+{
+ public class XAiProjectEFRepository : XBaseEFRepository, IXAiProjectRepository
+ where TContext : XDbContext
+ {
+ public XAiProjectEFRepository(
+ IXUnitOfWorks unitOfWorks,
+ XDataServiceConfiguration configuration,
+ IXAiProjectKeyGenerator keyGenerator = null,
+ IXAiProjectRepositoryEvents baseRepositoryEvents = null
+ ) : base(
+ unitOfWorks,
+ configuration,
+ keyGenerator,
+ baseRepositoryEvents
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiProjectEntityHub.cs
+
+using System;
+using Microsoft.Extensions.Logging;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xPushService.Base;
+
+namespace xAiModels.Providers.Entities
+{
+ public class XAiProjectEntityHub : XBaseEntityHub, IXAiProjectEntityHub
+ {
+ public XAiProjectEntityHub(
+ ILogger logger
+ ) : base(logger)
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiProjectInMemoryRepository.cs
+
+using System;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Configuration;
+using xDataService.Providers;
+
+namespace xAiModels.Providers.Entities
+{
+ public class XAiProjectInMemoryRepository : XBaseInMemoryRepository, IXAiProjectRepository
+ {
+ public XAiProjectInMemoryRepository(
+ XDataServiceConfiguration configuration,
+ IXAiProjectKeyGenerator keyGenerator = null,
+ IXAiProjectRepositoryEvents baseRepositoryEvents = null
+ ) : base(
+ configuration,
+ keyGenerator,
+ baseRepositoryEvents
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiProjectKeyGenerator.cs
+
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Providers;
+
+namespace xAiModels.Providers.Entities
+{
+ public class XAiProjectKeyGenerator : XGuidKeyGenerator, IXAiProjectKeyGenerator
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiProjectMongoRepository.cs
+
+using System;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Configuration;
+using xDataService.Providers;
+
+namespace xAiModels.Providers.Entities
+{
+ public class XAiProjectMongoRepository : XBaseMongoRepository, IXAiProjectRepository
+ {
+ public XAiProjectMongoRepository(
+ XDataBaseConfiguration dbConfiguration,
+ XDataServiceConfiguration configuration,
+ string collectionName = null,
+ IXAiProjectKeyGenerator keyGenerator = null,
+ IXAiProjectRepositoryEvents baseRepositoryEvents = null
+ ) : base(
+ dbConfiguration,
+ configuration,
+ collectionName,
+ keyGenerator,
+ baseRepositoryEvents
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiProjectRepositoryEvents.cs
+
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Providers;
+
+namespace xAiModels.Providers.Entities
+{
+ public class XAiProjectRepositoryEvents : XBaseRepositoryEvents, IXAiProjectRepositoryEvents
+ { }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiProjectRepositoryProvider.cs
+
+using System;
+using Microsoft.AspNetCore.SignalR;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Configuration;
+using xIdentityService.Interfaces;
+using xPushService.Base;
+
+namespace xAiModels.Providers.Entities
+{
+ public class XAiProjectRepositoryProvider : XBaseEntityProvider, IXAiProjectRepositoryProvider
+ {
+ public XAiProjectRepositoryProvider(
+ IHubContext hub,
+ IXAiProjectRepository repository,
+ XDataServiceConfiguration dataConfiguration,
+ IXIdentityProvider identityProvider = null
+ ) : base(
+ hub,
+ repository,
+ dataConfiguration,
+ identityProvider
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\Entities\XAiProjectSeederBase.cs
+
+using System;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Configuration;
+using xDataService.Providers;
+
+namespace xAiModels.Providers.Entities
+{
+ public abstract class XAiProjectSeederBase : XBaseDbSeeder, IXAiProjectSeeder
+ {
+ protected XAiProjectSeederBase(
+ string entity,
+ string database,
+ IXAiProjectRepository repository,
+ XDataServiceConfiguration dataServiceConfiguration
+ ) : base(
+ entity,
+ database,
+ repository,
+ dataServiceConfiguration
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\GraphQL\XAiConversationGraphQLTypeHelper.cs
+
+using System;
+using xAiModels.Constants;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.GraphQL;
+
+namespace xAiModels.Providers.GraphQL
+{
+ public class XAiConversationGraphQLTypeHelper : XBaseGraphQLTypeHelper, IXAiConversationGraphQLTypeHelper
+ {
+ public override string GetInQueryCollectionName()
+ {
+ return XAiModelsConstants.XAiConversationCollectionName;
+ }
+
+ public override string GetInQuerySingleName()
+ {
+ return XAiModelsConstants.XAiConversationSignleName;
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\GraphQL\XAiConversationGraphQuery.cs
+
+using System;
+using GraphQL.Types;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Configuration;
+using xDataService.GraphQL;
+
+namespace xAiModels.Providers.GraphQL
+{
+ public class XAiConversationGraphQuery : XBaseGraphQLQuery
+ {
+ public XAiConversationGraphQuery(
+ XDataServiceConfiguration configuration,
+ IXAiConversationRepository repository,
+ IXAiConversationGraphQLTypeHelper helper
+ ) : base(
+ configuration,
+ repository,
+ helper
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\GraphQL\XAiConversationGraphSchema.cs
+
+using System;
+using GraphQL.Types;
+
+namespace xAiModels.Providers.GraphQL
+{
+ public class XAiConversationGraphSchema : Schema
+ {
+ public XAiConversationGraphSchema(IServiceProvider services) : base(services)
+ {
+ Query = (XAiConversationGraphQuery)services.GetService(typeof(XAiConversationGraphQuery));
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\GraphQL\XAiConversationGraphType.cs
+
+using System;
+using xAiModels.Models.Entities;
+using xDataService.GraphQL;
+
+namespace xAiModels.Providers.GraphQL
+{
+ public class XAiConversationGraphType : XBaseGraphObjectType
+ {
+ public XAiConversationGraphType() : base()
+ {
+ Field(x => x.Title);
+ Field(x => x.OwnerId);
+ Field(x => x.CreatedOn);
+ Field(x => x.UpdatedAt);
+ Field(x => x.ProjectId);
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\GraphQL\XAiMessageGraphQLTypeHelper.cs
+
+using System;
+using xAiModels.Constants;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.GraphQL;
+
+namespace xAiModels.Providers.GraphQL
+{
+ public class XAiMessageGraphQLTypeHelper : XBaseGraphQLTypeHelper, IXAiMessageGraphQLTypeHelper
+ {
+ public override string GetInQueryCollectionName()
+ {
+ return XAiModelsConstants.XAiMessageCollectionName;
+ }
+
+ public override string GetInQuerySingleName()
+ {
+ return XAiModelsConstants.XAiMessageSingleName;
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\GraphQL\XAiMessageGraphQuery.cs
+
+using System;
+using GraphQL.Types;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Configuration;
+using xDataService.GraphQL;
+
+namespace xAiModels.Providers.GraphQL
+{
+ public class XAiMessageGraphQuery : XBaseGraphQLQuery
+ {
+ public XAiMessageGraphQuery(
+ XDataServiceConfiguration configuration,
+ IXAiMessageRepository repository,
+ IXAiMessageGraphQLTypeHelper helper
+ ) : base(
+ configuration,
+ repository,
+ helper
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\GraphQL\XAiMessageGraphSchema.cs
+
+using System;
+using GraphQL.Types;
+
+namespace xAiModels.Providers.GraphQL
+{
+ public class XAiMessageGraphSchema : Schema
+ {
+ public XAiMessageGraphSchema(IServiceProvider services) : base(services)
+ {
+ Query = (XAiMessageGraphQuery)services.GetService(typeof(XAiMessageGraphQuery));
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\GraphQL\XAiMessageGraphType.cs
+
+using System;
+using xAiModels.Models.Entities;
+using xDataService.GraphQL;
+
+namespace xAiModels.Providers.GraphQL
+{
+ public class XAiMessageGraphType: XBaseGraphObjectType
+ {
+ public XAiMessageGraphType() : base()
+ {
+ Field(x => x.Role);
+ Field(x => x.OwnerId);
+ Field(x => x.Content);
+ Field(x => x.Metadata);
+ Field(x => x.CreatedOn);
+ Field(x => x.UpdatedAt);
+ Field(x => x.ConversationId);
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\GraphQL\XAiProjectGraphQLTypeHelper.cs
+
+using System;
+using xAiModels.Constants;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.GraphQL;
+
+namespace xAiModels.Providers.GraphQL
+{
+ public class XAiProjectGraphQLTypeHelper : XBaseGraphQLTypeHelper, IXAiProjectGraphQLTypeHelper
+ {
+ public override string GetInQueryCollectionName()
+ {
+ return XAiModelsConstants.XAiProjectCollectionName;
+ }
+
+ public override string GetInQuerySingleName()
+ {
+ return XAiModelsConstants.XAiProjectSingleName;
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\GraphQL\XAiProjectGraphQuery.cs
+
+using System;
+using GraphQL.Types;
+using xAiModels.Interfaces.Entities;
+using xAiModels.Models.Entities;
+using xDataService.Configuration;
+using xDataService.GraphQL;
+
+namespace xAiModels.Providers.GraphQL
+{
+ public class XAiProjectGraphQuery : XBaseGraphQLQuery
+ {
+ public XAiProjectGraphQuery(
+ XDataServiceConfiguration configuration,
+ IXAiProjectRepository repository,
+ IXAiProjectGraphQLTypeHelper helper
+ ) : base(
+ configuration,
+ repository,
+ helper
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\GraphQL\XAiProjectGraphSchema.cs
+
+using System;
+using GraphQL.Types;
+
+namespace xAiModels.Providers.GraphQL
+{
+ public class XAiProjectGraphSchema : Schema
+ {
+ public XAiProjectGraphSchema(IServiceProvider services) : base(services)
+ {
+ Query = (XAiProjectGraphQuery)services.GetService(typeof(XAiProjectGraphQuery));
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiModels\Providers\GraphQL\XAiProjectGraphType.cs
+
+using System;
+using xAiModels.Models.Entities;
+using xDataService.GraphQL;
+
+namespace xAiModels.Providers.GraphQL
+{
+ public class XAiProjectGraphType : XBaseGraphObjectType
+ {
+ public XAiProjectGraphType() : base()
+ {
+ Field(x => x.Title);
+ Field(x => x.OwnerId);
+ Field(x => x.Prompt);
+ Field(x => x.CreatedOn);
+ Field(x => x.UpdatedAt);
+ Field(x => x.Description);
+ }
+ }
+}
diff --git a/Documents/GeneratedContext/xDashboard-xAiService-20260807_230244.txt b/Documents/GeneratedContext/xDashboard-xAiService-20260807_230244.txt
new file mode 100644
index 0000000..2b5bd93
--- /dev/null
+++ b/Documents/GeneratedContext/xDashboard-xAiService-20260807_230244.txt
@@ -0,0 +1,693 @@
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiService\Configurations\XAIServiceConfiguration.cs
+
+namespace xAiService.Configurations
+{
+ public partial class XAIServiceConfiguration
+ {
+ public string Url { get; set; }
+ public string XPoweredValue { get; set; }
+ public int DefaultClientTimeout { get; set; } = 360;
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiService\Constants\ConfigurationNodeNames.cs
+
+namespace xAiService.Constants
+{
+ public partial struct ConfigurationNodeNames
+ {
+ public const string AI_SERVICE_NODE = "AIServiceConfiguration";
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiService\Constants\XAiApiConstants.cs
+
+namespace xAiService.Constants
+{
+ public struct XAiApiQueryParams
+ {
+ public const string Prompt = "prompt";
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiService\Constants\XAiApiEndpoint.cs
+
+using xExceptions.Attributes;
+
+namespace xAiService.Constants
+{
+ public enum XAiApiEndpoint
+ {
+ [StringValue("AskAI")]
+ Ask,
+ [StringValue("AskAIStream")]
+ Stream,
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiService\DI\XDIHelperExtension.cs
+
+using System;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using xAiService.Configurations;
+using xAiService.Constants;
+using xAiService.Extensions;
+using xAiService.Interfaces;
+using xAiService.Services;
+using xCommons.Extensions;
+using xExceptions.Constants;
+
+namespace xAiService.DI
+{
+ public static partial class XDIHelperExtension
+ {
+ ///
+ /// Extract AI Service Configuration ...
+ ///
+ ///
+ ///
+ public static XAIServiceConfiguration GetXAIServiceConfiguration(this IConfiguration source)
+ {
+ //
+ XAIServiceConfiguration result = null;
+
+ //
+ var section = source.GetSection(ConfigurationNodeNames.AI_SERVICE_NODE);
+ if (!section.IsNull())
+ {
+ result = section.Get();
+ }
+
+ //
+ return result;
+ }
+
+ ///
+ /// Add AI Service Configuration ...
+ ///
+ ///
+ ///
+ public static void AddXAIServiceConfiguration(
+ this IServiceCollection source,
+ XAIServiceConfiguration configuration
+ )
+ {
+ source.AddSingleton(configuration);
+ }
+
+ ///
+ /// Adding XAiService ...
+ ///
+ ///
+ ///
+ ///
+ public static void AddXAIService(
+ this IServiceCollection services,
+ IConfiguration configuration,
+ ServiceLifetime lifeTime = ServiceLifetime.Scoped
+ )
+ {
+ //
+ var config = configuration.GetXAIServiceConfiguration();
+ AddAIService(
+ services,
+ config,
+ lifeTime
+ );
+ }
+
+ ///
+ /// Adding XAiService ...
+ ///
+ ///
+ ///
+ ///
+ public static void AddXAIService(
+ this IServiceCollection services,
+ XAIServiceConfiguration configuration,
+ ServiceLifetime lifeTime = ServiceLifetime.Scoped
+ )
+ {
+ //
+ AddAIService(
+ services,
+ configuration,
+ lifeTime
+ );
+ }
+
+ //
+ #region Private ...
+ ///
+ /// a LogTag for Service ...
+ ///
+ private static string XLogTag = "XFileService";
+
+ ///
+ /// print a log in Console ...
+ ///
+ ///
+ private static void Log(string message)
+ {
+ Console.WriteLine($"{XLogTag} => {message}");
+ }
+
+ ///
+ /// Adding Ai Service ...
+ ///
+ ///
+ ///
+ ///
+ private static void AddAIService(
+ this IServiceCollection services,
+ XAIServiceConfiguration configuration,
+ ServiceLifetime lifeTime = ServiceLifetime.Singleton
+ )
+ {
+ //
+ var exception = XException.InvalidArgs.ToException(); ;
+
+ //
+ // Services ...
+ var isServicesExists = !services.IsNull();
+ if (!isServicesExists)
+ {
+ //
+ Log("AddAIService failed, services not provided ...");
+ throw exception;
+ }
+
+ //
+ // Lifetime ...
+ var isLifetimeExists = !lifeTime.IsNull();
+ if (!isLifetimeExists)
+ {
+ //
+ Log("AddAIService failed, lifetime not provided ...");
+ throw exception;
+ }
+
+ //
+ // Check Dependencies Exists ...
+ var isDependenciesPassed = true;
+ if (!isDependenciesPassed)
+ {
+ //
+ Log("AddAIService failed due Dependencies Issues, not provided ...");
+ throw exception;
+ }
+
+ //
+ // Validate Configurations ...
+ var isConfigurationExists =
+ !configuration.IsNull() &&
+ configuration.IsValid();
+ if (!isConfigurationExists)
+ {
+ //
+ Log("AddAIService failed due InValid Service Configuration or not provided ...");
+ throw exception;
+ }
+
+ //
+ // Register Configurations ...
+ services.AddXAIServiceConfiguration(configuration);
+
+ //
+ // Register Services ...
+ services.Add(new ServiceDescriptor(typeof(IXAiService), typeof(XAiService), lifeTime));
+ }
+ #endregion
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiService\Extensions\ConfigurationExtensions.cs
+
+using xAiService.Configurations;
+using xCommons.Extensions;
+
+namespace xAiService.Extensions
+{
+ public static class ModelExtensions
+ {
+ ///
+ /// Validate XAiServiceConfiguration ...
+ ///
+ ///
+ ///
+ public static bool IsValid(this XAIServiceConfiguration source)
+ {
+ //
+ bool result =
+ !source.IsNull() &&
+ !source.Url.IsNullOrEmpty() &&
+ source.Url.IsValidUrl();
+
+ //
+ return result;
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiService\Extensions\PromptExtensions.cs
+
+using System.Collections.Generic;
+using System.Linq;
+using xAiService.Models.Dtos;
+using xCommons.Extensions;
+
+namespace xAiService.Extensions
+{
+ public static class PromptExtensions
+ {
+ ///
+ /// Get Template Params Filled Prompt ...
+ ///
+ ///
+ ///
+ ///
+ public static string GetMessage(
+ this XPromptDto source,
+ IDictionary @params = null
+ )
+ {
+ //
+ var result = string.Empty;
+
+ //
+ if (!source.IsNullOrDefault() &&
+ !source.Prompt.IsNullOrEmpty()
+ )
+ {
+ result = source.Prompt;
+ }
+
+ //
+ // Check Params Conditions ...
+ if (!source.Params.IsNullOrDefault() &&
+ source.Params.HasChild() &&
+ !@params.IsNullOrDefault() &&
+ @params.HasChild()
+ )
+ {
+ //
+ // Select Params ...
+ var existsParams = source.Params
+ .Where(p => @params.Any(pr => pr.Key == p.Name))
+ .Distinct()
+ .ToList();
+
+ //
+ // Replace Selected Params ...
+ existsParams
+ .ForEach(pk =>
+ {
+ result = result.Replace(pk.Param, @params[pk.Name]);
+ });
+ }
+
+ //
+ return result;
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiService\Helpers\XPromptHelper.cs
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using xAiService.Models.Dtos;
+using xCommons.Extensions;
+
+namespace xAiService.Helpers
+{
+ public static class XPromptHelper
+ {
+ ///
+ /// Holds Initialized Prompts ...
+ ///
+ private static XPromptsDto prompts;
+
+ ///
+ /// Initialize Prompt Helper ...
+ ///
+ ///
+ ///
+ ///
+ public static void Initialize(string path = "prompts.json")
+ {
+ //
+ // Create full Path and Check File Exists ...
+ var fullPath = Path.Combine(AppContext.BaseDirectory, path);
+ if (!File.Exists(fullPath))
+ {
+ throw new Exception($"Prompts Resources not found: {fullPath}");
+ }
+
+ //
+ // Read File as Json Text ...
+ var json = File.ReadAllText(fullPath);
+ var options = new JsonSerializerOptions
+ {
+ AllowTrailingCommas = true,
+ PropertyNameCaseInsensitive = true,
+ ReadCommentHandling = JsonCommentHandling.Skip,
+ Converters =
+ {
+ new JsonStringEnumConverter(
+ namingPolicy: null,
+ allowIntegerValues: false
+ )
+ }
+ };
+
+ //
+ // Serialized Root Object ...
+ var root = JsonSerializer.Deserialize(json, options);
+ if (!root.IsNullOrDefault())
+ {
+ prompts = new XPromptsDto { Prompts = root.Prompts };
+ }
+ }
+
+ ///
+ /// Retrieve all Allowed Prompts as Enumerable ...
+ ///
+ ///
+ public static IEnumerable GetPrompts()
+ {
+ return prompts!.Prompts.AsEnumerable();
+ }
+
+ ///
+ /// Get Specified Prompt ...
+ ///
+ ///
+ ///
+ ///
+ public static XPromptDto GetPrompt(string name)
+ {
+ //
+ return GetPrompts()
+ .FirstOrDefault(p => p.Name == name);
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiService\Interfaces\IXAiService.cs
+
+using System.IO;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.Extensions.AI;
+using xAiService.Configurations;
+using xIdentityModels.Models;
+using xIdentityService.Interfaces;
+
+namespace xAiService.Interfaces
+{
+ public interface IXAiService : IXBaseIdentityHttpProvider
+ {
+ ///
+ /// XAiService Configurations ...
+ ///
+ ///
+ XAIServiceConfiguration Configuration { get; }
+
+ //
+ #region Text Actions ...
+ ///
+ /// Generated Response ...
+ ///
+ ///
+ ///
+ ///
+ ///
+ public Task GetResponseAsync(
+ string prompt,
+ XUserClaimsInfoDto userInfo,
+ CancellationToken cancellationToken = default
+ );
+
+ ///
+ /// Generated Response ...
+ ///
+ ///
+ ///
+ ///
+ ///
+ public Task GetTextResponseAsync(
+ string prompt,
+ XUserClaimsInfoDto userInfo,
+ CancellationToken cancellationToken = default
+ );
+
+ ///
+ /// Generate Text Response Stream ...
+ ///
+ ///
+ ///
+ ///
+ ///
+ Task GetTextReponseStreamAsync(
+ string prompt,
+ XUserClaimsInfoDto userInfo,
+ CancellationToken cancellationToken = default
+ );
+ #endregion
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiService\Interfaces\IXAiServiceControllerBase.cs
+
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+
+namespace xAiService.Interfaces
+{
+ public interface IXAiServiceControllerBase
+ {
+ Task> Ask(
+ [FromQuery] string prompt,
+ CancellationToken cancellationToken = default
+ );
+
+ Task AskStream(
+ [FromQuery] string prompt,
+ CancellationToken cancellationToken = default
+ );
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiService\Models\Dtos\XPromptsDto.cs
+
+namespace xAiService.Models.Dtos
+{
+ ///
+ /// Described Prompts in app ...
+ ///
+ public class XPromptsDto
+ {
+ public XPromptDto[] Prompts { get; set; } = [];
+ }
+
+ ///
+ /// a Single Prompt Description ...
+ ///
+ public class XPromptDto
+ {
+ ///
+ /// Prompt Name ...
+ ///
+ public string Name { get; set; }
+
+ ///
+ /// Prompt Template Message ...
+ ///
+ public string Prompt { get; set; }
+
+ ///
+ /// Prompt Description ...
+ ///
+ public string Description { get; set; }
+
+ ///
+ /// Describe Prompt Params ...
+ ///
+ public virtual XPromptParamDto[] Params { get; set; } = null;
+ }
+
+ ///
+ /// Prompt Param used to Fill dynamic Datas to Specified Prompts ...
+ ///
+ public class XPromptParamDto
+ {
+ ///
+ /// Param Name ...
+ ///
+ public string Name { get; set; }
+
+ ///
+ /// Parma Identifier ...
+ ///
+ public string Param { get; set; }
+
+ ///
+ /// Param Description ...
+ ///
+ public string Description { get; set; }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xAiService\Services\XAiService.cs
+
+using System.Collections.Generic;
+using System.IO;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.Extensions.AI;
+using Microsoft.Extensions.Logging;
+using xAiService.Configurations;
+using xAiService.Constants;
+using xAiService.Interfaces;
+using xCommons.Providers;
+using xHttpService.Constants;
+using xIdentityModels.Models;
+using xIdentityService.Interfaces;
+using xIdentityService.Providers;
+
+namespace xAiService.Services
+{
+ public class XAiService : XBaseIdentityHttpProvider, IXAiService
+ {
+ ///
+ /// XAiService Configurations ...
+ ///
+ ///
+ public XAIServiceConfiguration Configuration { get; }
+
+ public XAiService(
+ ILogger logger,
+ IXTokenProvider tokenProvider,
+ IXIdentityProvider identityProvider,
+ XAIServiceConfiguration configuration,
+ XValidationProvider validationProvider
+ ) : base(
+ configuration.Url,
+ logger,
+ configuration.XPoweredValue,
+ configuration.DefaultClientTimeout,
+ tokenProvider,
+ identityProvider,
+ validationProvider
+ )
+ { }
+
+ //
+ #region Text Actions ...
+ ///
+ /// Generated Response ...
+ ///
+ ///
+ ///
+ ///
+ ///
+ public Task GetResponseAsync(
+ string prompt,
+ XUserClaimsInfoDto userInfo,
+ CancellationToken cancellationToken = default
+ )
+ {
+ throw new System.NotImplementedException();
+ }
+
+ ///
+ /// Generated Response ...
+ ///
+ ///
+ ///
+ ///
+ ///
+ public async Task GetTextResponseAsync(
+ string prompt,
+ XUserClaimsInfoDto userInfo,
+ CancellationToken cancellationToken = default
+ )
+ {
+ //
+ // Validate Args ...
+ ValidationProvider.NotEmpty(prompt);
+
+ //
+ var client = GetRestClient(userInfo);
+ var request = GetRestRequet(
+ endpoint: XAiApiEndpoint.Ask,
+ addXPoweredValue: true,
+ queryStrings: new Dictionary
+ {
+ { XAiApiQueryParams.Prompt, prompt }
+ }
+ );
+
+ //
+ var response = await RunRestRequest(
+ client,
+ request,
+ XHttpMethod.GET,
+ cancellationToken: cancellationToken
+ );
+
+ //
+ return response;
+ }
+
+ ///
+ /// Generate Text Response Stream ...
+ ///
+ ///
+ ///
+ ///
+ ///
+ public async Task GetTextReponseStreamAsync(
+ string prompt,
+ XUserClaimsInfoDto userInfo,
+ CancellationToken cancellationToken = default
+ )
+ {
+ //
+ // Validate Args ...
+ ValidationProvider
+ .GroupValidationBuilder()
+ .AddNotEmpty(prompt)
+ .AddNotNull(userInfo)
+ .AddNotZero(userInfo.ExpiresAt)
+ .AddNotEmpty(userInfo.AccessToken)
+ .AddNotEmpty(userInfo.RefreshToken)
+ .ValidateGroup();
+
+ //
+ var tokens = ToTokenResponse(userInfo);
+ var result = await StreamData(
+ tokens: tokens,
+ addXPoweredValue: true,
+ endpoint: XAiApiEndpoint.Stream,
+ cancellationToken: cancellationToken,
+ queryStrings: new Dictionary
+ {
+ { XAiApiQueryParams.Prompt, prompt }
+ }
+ );
+
+ //
+ return result;
+ }
+ #endregion
+ }
+}
diff --git a/Documents/GeneratedContext/xDashboard-xCategoryService-20260807_230253.txt b/Documents/GeneratedContext/xDashboard-xCategoryService-20260807_230253.txt
new file mode 100644
index 0000000..e34bf51
--- /dev/null
+++ b/Documents/GeneratedContext/xDashboard-xCategoryService-20260807_230253.txt
@@ -0,0 +1,10098 @@
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xCategoryService\Configurations\XCategoryServiceConfiguration.cs
+
+using xCategoryService.Models.Dtos;
+
+namespace xCategoryService.Configurations
+{
+ ///
+ /// a Configuration Class for Providing Data to Configure XCategoryService ...
+ ///
+ public class XCategoryServiceConfiguration
+ {
+ ///
+ /// a List of Categories for Seeding ...
+ ///
+ public XCategoryResourceDto[] Categories { get; set; } = [];
+
+ ///
+ /// a List of SubCategories for Seeding ...
+ ///
+ public XSubCategoryResourceDto[] SubCategories { get; set; } = [];
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xCategoryService\Configurations\Entities\XCategoryEntityConfiguration.cs
+
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using xCategoryService.Constants;
+using xCategoryService.Models.Entities;
+using xDataService.Providers;
+
+namespace xCategoryService.Configurations.Entities
+{
+ public class XCategoryEntityConfiguration : XBaseEntityTypeConfiguration
+ {
+ public override void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable(XCategoryServiceConstants.XCategoryTable);
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xCategoryService\Configurations\Entities\XSubCategoryEntityConfiguration.cs
+
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using xCategoryService.Constants;
+using xCategoryService.Models.Entities;
+using xDataService.Providers;
+
+namespace xCategoryService.Configurations.Entities
+{
+ public class XSubCategoryEntityConfiguration : XBaseEntityTypeConfiguration
+ {
+ public override void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable(XCategoryServiceConstants.XSubCategoryTable);
+ }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xCategoryService\Constants\ConfigurationNodeNames.cs
+
+namespace xCategoryService.Constants
+{
+ public partial struct ConfigurationNodeNames
+ {
+ public const string CATEGORY_SERVICE_NODE = "CategoryServiceConfiguration";
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xCategoryService\Constants\XCategoryServiceConstants.cs
+
+namespace xCategoryService.Constants
+{
+ public struct XCategoryServiceConstants
+ {
+ //
+ // Service Extensions Log Tag ...
+ public const string XCategoryServiceDILogTag = "XCategoryService";
+
+ //
+ // Table Mapping Identifiers ...
+ public const string XCategoryTable = "Categories";
+ public const string XSubCategoryTable = "SubCategories";
+
+ //
+ // GraphQL Collection Mappings ...
+ public const string XCategorySingleName = "category";
+ public const string XCategoryCollectionName = "categories";
+ public const string XSubCategorySingleName = "subCategory";
+ public const string XSubCategoryCollectionName = "subCategories";
+
+ //
+ // Hubs ...
+ public const string XCategoryDtoHub = "categoryDto";
+ public const string XCategoryEntityHub = "categoryEntity";
+ public const string XSubCategoryDtoHub = "subCategoryDto";
+ public const string XSubCategoryEntityHub = "subCategoryEntity";
+
+ //
+ // Custome Constants ...
+ public const string SubCategoryReference = "SubCat";
+ public const string CategoryTitleResourceIdentifier = "CatT";
+ public const string CategoryDescriptionResourceIdentifier = "CatD";
+ public const string SubCategoryTitleResourceIdentifier = "SubCatT";
+ public const string SubCategoryDescriptionResourceIdentifier = "SubCatD";
+
+ //
+ // EF Repositories Helper Extensions ...
+ public const string GetXCategoryEFRepositoryDescriptor = "GetXCategoryEFRepositoryDescriptor";
+ public const string GetXSubCategoryEFRepositoryDescriptor = "GetXSubCategoryEFRepositoryDescriptor";
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xCategoryService\Controllers\XCategoryProviderControllerBase.cs
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.EntityFrameworkCore.Query;
+using Microsoft.Extensions.Logging;
+using xCategoryService.Interfaces;
+using xCategoryService.Models.Dtos;
+using xCategoryService.Models.Entities;
+using xCategoryService.Providers.Dtos;
+using xCommons.Configurations;
+using xCommons.Extensions;
+using xCommons.Providers;
+using xExceptions.Constants;
+using xIdentityService.Interfaces;
+using xModels.Dtos;
+using xPushService.Controllers;
+
+namespace xCategoryService.Controllers
+{
+ public abstract class XCategoryProviderControllerBase : XBaseProvidedController, IXCategoryProviderController
+ {
+ private readonly IXCategoryProvider provider;
+
+ protected XCategoryProviderControllerBase(
+ ILogger logger,
+ XAppConfiguration appConfiguration,
+ IXIdentityProvider identityProvider,
+ XValidationProvider validationProvider,
+ IXCategoryProvider provider,
+ Func, IOrderedQueryable> defaultOrderBuilder = null,
+ Func, IIncludableQueryable> defaultIncludeBuilder = null
+ ) : base(
+ logger,
+ appConfiguration,
+ identityProvider,
+ validationProvider,
+ provider,
+ defaultOrderBuilder,
+ defaultIncludeBuilder
+ )
+ {
+ this.provider = provider;
+ }
+
+ //
+ #region Overrides ...
+ [NonAction]
+ [HttpGet("{id}")]
+ public override async Task> Get(
+ [FromRoute] int id,
+ [FromQuery] bool useDefaultIncludes = false,
+ CancellationToken cancellationToken = default
+ )
+ {
+ //
+ return await base.Get(
+ id: id,
+ useDefaultIncludes: useDefaultIncludes,
+ cancellationToken: cancellationToken
+ );
+ }
+
+ [NonAction]
+ [HttpGet("")]
+ public override async Task>> GetAll(
+ [FromQuery] bool useDefaultOrders = false,
+ [FromQuery] bool useDefaultIncludes = false,
+ CancellationToken cancellationToken = default
+ )
+ {
+ //
+ return await base.GetAll(
+ useDefaultOrders: useDefaultOrders,
+ cancellationToken: cancellationToken,
+ useDefaultIncludes: useDefaultIncludes
+ );
+ }
+
+ [NonAction]
+ [HttpGet("Find/One")]
+ public override async Task> FindOne(
+ [FromRoute] string query,
+ [FromQuery] bool useDefaultIncludes = false,
+ CancellationToken cancellationToken = default
+ )
+ {
+ //
+ return await base.FindOne(
+ query: query,
+ cancellationToken: cancellationToken,
+ useDefaultIncludes: useDefaultIncludes
+ );
+ }
+
+ [NonAction]
+ [HttpGet("Find/Many")]
+ public override async Task>> FindMany(
+ [FromRoute] string query,
+ [FromQuery] bool useDefaultOrders = false,
+ [FromQuery] bool useDefaultIncludes = false,
+ CancellationToken cancellationToken = default
+ )
+ {
+ //
+ return await base.FindMany(
+ query: query,
+ useDefaultOrders: useDefaultOrders,
+ cancellationToken: cancellationToken,
+ useDefaultIncludes: useDefaultIncludes
+ );
+ }
+
+ [NonAction]
+ [HttpGet("Query")]
+ public override async Task>> Query(
+ [FromQuery] XQuery query,
+ [FromQuery] bool useDefaultOrders = false,
+ [FromQuery] bool useDefaultIncludes = false,
+ CancellationToken cancellationToken = default
+ )
+ {
+ //
+ return await base.Query(
+ query: query,
+ useDefaultOrders: useDefaultOrders,
+ cancellationToken: cancellationToken,
+ useDefaultIncludes: useDefaultIncludes
+ );
+ }
+
+ [NonAction]
+ [HttpGet("Query/Owned")]
+ public override async Task>> QueryOwned(
+ [FromQuery] XQuery query,
+ [FromQuery] bool useDefaultOrders = false,
+ [FromQuery] bool useDefaultIncludes = false,
+ CancellationToken cancellationToken = default
+ )
+ {
+ //
+ return await base.QueryOwned(
+ query: query,
+ useDefaultOrders: useDefaultOrders,
+ cancellationToken: cancellationToken,
+ useDefaultIncludes: useDefaultIncludes
+ );
+ }
+
+ [NonAction]
+ [HttpPost("")]
+ public override async Task> Add(
+ [FromBody] XCategoryDto item,
+ CancellationToken cancellationToken = default
+ )
+ {
+ //
+ return await base.Add(
+ item: item,
+ cancellationToken: cancellationToken
+ );
+ }
+
+ [NonAction]
+ [HttpPut("{id}")]
+ public override async Task> Update(
+ [FromRoute] int id,
+ [FromBody] XCategoryDto item,
+ CancellationToken cancellationToken = default
+ )
+ {
+ //
+ return await base.Update(
+ id: id,
+ item: item,
+ cancellationToken: cancellationToken
+ );
+ }
+
+ [NonAction]
+ [HttpDelete("{id}")]
+ public override async Task> Remove(
+ [FromRoute] int id,
+ CancellationToken cancellationToken = default
+ )
+ {
+ //
+ return await base.Remove(
+ id: id,
+ cancellationToken: cancellationToken
+ );
+ }
+ #endregion
+
+ //
+ #region Actions ...
+ ///
+ /// Check Has Specified Locale or not ...
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpGet("Resources/{id}/HasLocale")]
+ public virtual async Task> HasLocale(
+ [FromRoute] int id,
+ [FromQuery] string language,
+ CancellationToken cancellationToken = default
+ )
+ {
+ //
+ try
+ {
+ //
+ // Validate ...
+ if (!ModelState.IsValid ||
+ !id.IsValidIntId())
+ {
+ XException.InvalidArgs.Throw();
+ }
+ ValidationProvider.NotEmpty(language);
+
+ //
+ var result = await provider.HasLocale(
+ id: id,
+ language: language,
+ cancellationToken: cancellationToken
+ );
+
+ //
+ return Ok(result);
+ }
+ catch (Exception ex)
+ {
+ //
+ var result = GetExceptionActionResult(ex);
+ return result;
+ }
+ }
+
+ ///
+ /// Load an Item by all of it's Related Translations ...
+ ///
+ ///
+ ///
+ ///
+ [HttpGet("Resources/{id}")]
+ public virtual async Task> GetResource(
+ [FromRoute] int id,
+ CancellationToken cancellationToken = default
+ )
+ {
+ //
+ try
+ {
+ //
+ // Validate ...
+ if (!ModelState.IsValid ||
+ !id.IsValidIntId())
+ {
+ XException.InvalidArgs.Throw();
+ }
+
+ //
+ var result = await provider.GetResource(
+ id: id,
+ cancellationToken: cancellationToken
+ );
+
+ //
+ return Ok(result.ToDynamicObject());
+ }
+ catch (Exception ex)
+ {
+ //
+ var result = GetExceptionActionResult(ex);
+ return result;
+ }
+ }
+
+ ///
+ /// Add Category Item for Specified Language ...
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpPost("Resources")]
+ public virtual async Task> Add(
+ [FromBody] XCategoryDto item,
+ [FromQuery] string language = null,
+ CancellationToken cancellationToken = default
+ )
+ {
+ //
+ try
+ {
+ //
+ // Validate ...
+ if (!ModelState.IsValid)
+ {
+ XException.InvalidArgs.Throw();
+ }
+ await ValidationProvider
+ .GroupValidationBuilder()
+ .AddNotNull(item)
+ .AddNotEmpty(language)
+ .AddNotEmpty(item.Title)
+ .AddNotEmpty(item.Description)
+ .ValidateGroupAsync();
+
+ //
+ // Reading Requirements ...
+ var userInfo = await GetUserInfo();
+ var connectionId = GetConnectionId();
+
+ //
+ var result = await provider.Add(
+ item: item,
+ language: language,
+ userInfo: userInfo,
+ connectionId: connectionId,
+ cancellationToken: cancellationToken
+ );
+
+ //
+ return Ok(result.ToDynamicObject());
+ }
+ catch (Exception ex)
+ {
+ //
+ var result = GetExceptionActionResult(ex);
+ return result;
+ }
+ }
+
+ ///
+ /// Add Category Item for by It's Locales ...
+ ///
+ ///
+ ///
+ ///
+ [HttpPost("Resources/AddResource")]
+ public virtual async Task> AddResource(
+ [FromBody] XCategoryResourceDto item,
+ CancellationToken cancellationToken = default
+ )
+ {
+ //
+ try
+ {
+ //
+ // Validate ...
+ if (!ModelState.IsValid)
+ {
+ XException.InvalidArgs.Throw();
+ }
+ await ValidationProvider
+ .GroupValidationBuilder()
+ .AddNotNull(item)
+ .AddNotNull(item.Titles)
+ .AddNotZeroChilds(item.Titles.Locales)
+ .ValidateGroupAsync();
+
+ //
+ // Reading Requirements ...
+ var userInfo = await GetUserInfo();
+ var connectionId = GetConnectionId();
+
+ //
+ var result = await provider.AddResource(
+ item: item,
+ userInfo: userInfo,
+ connectionId: connectionId,
+ cancellationToken: cancellationToken
+ );
+
+ //
+ return Ok(result.ToDynamicObject());
+ }
+ catch (Exception ex)
+ {
+ //
+ var result = GetExceptionActionResult(ex);
+ return result;
+ }
+ }
+
+ ///
+ /// Remove Item for Specified Language ...
+ ///
+ ///
+ /// if null, Remove All
+ ///
+ ///
+ [HttpDelete("Resources/{id}")]
+ public virtual async Task> Remove(
+ [FromRoute] int id,
+ [FromQuery] string language = null,
+ CancellationToken cancellationToken = default
+ )
+ {
+ //
+ try
+ {
+ //
+ // Validate ...
+ if (!ModelState.IsValid ||
+ !id.IsValidIntId())
+ {
+ XException.InvalidArgs.Throw();
+ }
+
+ //
+ // Reading Requirements ...
+ var userInfo = await GetUserInfo();
+ var connectionId = GetConnectionId();
+
+ //
+ var result = await provider.Remove(
+ id: id,
+ language: language,
+ userInfo: userInfo,
+ connectionId: connectionId,
+ cancellationToken: cancellationToken
+ );
+
+ //
+ return Ok(result.ToDynamicObject());
+ }
+ catch (Exception ex)
+ {
+ //
+ var result = GetExceptionActionResult(ex);
+ return result;
+ }
+ }
+
+ ///
+ /// Update a Category Item for Specified Language ...
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpPut("Resources/{id}")]
+ public virtual async Task> Update(
+ [FromRoute] int id,
+ [FromBody] XCategoryDto item,
+ [FromQuery] string language = null,
+ CancellationToken cancellationToken = default
+ )
+ {
+ //
+ try
+ {
+ //
+ // Validate ...
+ if (!ModelState.IsValid ||
+ !id.IsValidIntId())
+ {
+ XException.InvalidArgs.Throw();
+ }
+ await ValidationProvider
+ .GroupValidationBuilder()
+ .AddNotNull(item)
+ .AddNotEmpty(language)
+ .AddNotEmpty(item.Title)
+ .AddNotEmpty(item.Description)
+ .ValidateGroupAsync();
+
+ //
+ // Reading Requirements ...
+ var userInfo = await GetUserInfo();
+ var connectionId = GetConnectionId();
+
+ //
+ var result = await provider.Update(
+ id: id,
+ item: item,
+ language: language,
+ userInfo: userInfo,
+ connectionId: connectionId,
+ cancellationToken: cancellationToken
+ );
+
+ //
+ return Ok(result.ToDynamicObject());
+ }
+ catch (Exception ex)
+ {
+ //
+ var result = GetExceptionActionResult(ex);
+ return result;
+ }
+ }
+
+ ///
+ /// Refresh a Resource ...
+ ///
+ ///
+ ///
+ ///
+ [HttpPost("Resources/Refresh")]
+ public virtual async Task> Refresh(
+ [FromBody] XCategoryResourceDto resource,
+ CancellationToken cancellationToken = default
+ )
+ {
+ //
+ try
+ {
+ //
+ // Validate ...
+ if (!ModelState.IsValid)
+ {
+ XException.InvalidArgs.Throw();
+ }
+ await ValidationProvider
+ .GroupValidationBuilder()
+ .AddNotNull(resource)
+ .AddNotNull(resource.Item)
+ .ValidateGroupAsync();
+
+ //
+ // Reading Requirements ...
+ var userInfo = await GetUserInfo();
+ var connectionId = GetConnectionId();
+
+ //
+ var result = await provider.Refresh(
+ resource: resource,
+ userInfo: userInfo,
+ connectionId: connectionId,
+ cancellationToken: cancellationToken
+ );
+
+ //
+ return Ok(result.ToDynamicObject());
+ }
+ catch (Exception ex)
+ {
+ //
+ var result = GetExceptionActionResult(ex);
+ return result;
+ }
+ }
+
+ ///
+ /// Get All Resources ...
+ ///
+ ///
+ ///
+ [HttpGet("Resources/All")]
+ public virtual async Task>> GetAllResources(
+ CancellationToken cancellationToken = default
+ )
+ {
+ //
+ try
+ {
+ //
+ // Validate ...
+ if (!ModelState.IsValid)
+ {
+ XException.InvalidArgs.Throw();
+ }
+
+ //
+ var result = await provider.GetAllResources(
+ cancellationToken: cancellationToken
+ );
+
+ //
+ return Ok(result.ToDynamicObject());
+ }
+ catch (Exception ex)
+ {
+ //
+ var result = GetExceptionActionResult(ex);
+ return result;
+ }
+ }
+
+ ///
+ /// Find One Resource ...
+ ///
+ ///
+ ///
+ ///
+ [HttpGet("Resources/Find/One")]
+ public virtual async Task> FindOneResource(
+ [FromQuery] string query,
+ CancellationToken cancellationToken = default
+ )
+ {
+ //
+ try
+ {
+ //
+ // Validate ...
+ if (!ModelState.IsValid)
+ {
+ XException.InvalidArgs.Throw();
+ }
+ await ValidationProvider
+ .GroupValidationBuilder()
+ .AddNotEmpty(query)
+ .ValidateGroupAsync();
+
+ //
+ var result = await provider.FindOneResource(
+ cancellationToken: cancellationToken,
+ predicate: x => x.PropValuesContains(query)
+ );
+
+ //
+ return Ok(result.ToDynamicObject());
+ }
+ catch (Exception ex)
+ {
+ //
+ var result = GetExceptionActionResult(ex);
+ return result;
+ }
+ }
+
+ ///
+ /// Find Many Resource ...
+ ///
+ ///
+ ///
+ ///
+ [HttpGet("Resources/Find/Many")]
+ public virtual async Task>> FindManyResource(
+ [FromQuery] string query,
+ CancellationToken cancellationToken = default
+ )
+ {
+ //
+ try
+ {
+ //
+ // Validate ...
+ if (!ModelState.IsValid)
+ {
+ XException.InvalidArgs.Throw();
+ }
+ await ValidationProvider
+ .GroupValidationBuilder()
+ .AddNotEmpty(query)
+ .ValidateGroupAsync();
+
+ //
+ var result = await provider.FindManyResource(
+ cancellationToken: cancellationToken,
+ predicate: x => x.PropValuesContains(query),
+ orderBuilder: x => x.OrderBy(y => y.Item.Id)
+ );
+
+ //
+ return Ok(result.ToDynamicObject());
+ }
+ catch (Exception ex)
+ {
+ //
+ var result = GetExceptionActionResult(ex);
+ return result;
+ }
+ }
+
+ ///
+ /// Retrieve Resources by Query Pattern ...
+ ///
+ ///
+ ///
+ ///
+ [HttpGet("Resources/Query")]
+ public virtual async Task>> QueryResources(
+ [FromQuery] XQuery query = null,
+ CancellationToken cancellationToken = default
+ )
+ {
+ //
+ try
+ {
+ //
+ // Validate ...
+ if (!ModelState.IsValid)
+ {
+ XException.InvalidArgs.Throw();
+ }
+ await ValidationProvider
+ .GroupValidationBuilder()
+ .AddNotNull(query)
+ .ValidateGroupAsync();
+
+ //
+ var result = await provider.QueryResources(
+ query: query,
+ predicate: null,
+ cancellationToken: cancellationToken,
+ orderBuilder: x => x.OrderBy(y => y.Item.Id)
+ );
+
+ //
+ return Ok(result.ToDynamicObject());
+ }
+ catch (Exception ex)
+ {
+ //
+ var result = GetExceptionActionResult(ex);
+ return result;
+ }
+ }
+ #endregion
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xCategoryService\Controllers\XCategoryRepositoryControllerBase.cs
+
+using System;
+using System.Linq;
+using Microsoft.EntityFrameworkCore.Query;
+using Microsoft.Extensions.Logging;
+using xCategoryService.Interfaces.Entities;
+using xCategoryService.Models.Entities;
+using xCommons.Configurations;
+using xCommons.Providers;
+using xDataService.Controllers;
+using xDataService.Interfaces;
+
+namespace xCategoryService.Controllers
+{
+ public abstract class XCategoryRepositoryControllerBase : XBaseRepositoryController, IXBaseRepositoryController
+ {
+ protected XCategoryRepositoryControllerBase(
+ ILogger logger,
+ XAppConfiguration appConfiguration,
+ XValidationProvider validationProvider,
+ IXCategoryRepository repository,
+ Func, IOrderedQueryable> defaultOrderBuilder = null,
+ Func, IIncludableQueryable> defaultIncludeBuilder = null
+ ) : base(
+ logger,
+ appConfiguration,
+ validationProvider,
+ repository,
+ defaultOrderBuilder,
+ defaultIncludeBuilder
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xCategoryService\Controllers\XCategoryRepositoryProviderControllerBase.cs
+
+using System;
+using System.Linq;
+using Microsoft.EntityFrameworkCore.Query;
+using Microsoft.Extensions.Logging;
+using xCategoryService.Interfaces.Entities;
+using xCategoryService.Models.Entities;
+using xCategoryService.Providers.Entities;
+using xCommons.Configurations;
+using xCommons.Providers;
+using xIdentityService.Interfaces;
+using xPushService.Controllers;
+using xPushService.Interfaces;
+
+namespace xCategoryService.Controllers
+{
+ public abstract class XCategoryRepositoryProviderControllerBase : XBaseRepositoryProviderController, IXBaseRepositoryProviderController
+ {
+ protected XCategoryRepositoryProviderControllerBase(
+ ILogger logger,
+ XAppConfiguration appConfiguration,
+ IXIdentityProvider identityProvider,
+ XValidationProvider validationProvider,
+ IXCategoryRepositoryProvider provider,
+ Func, IOrderedQueryable> defaultOrderBuilder = null,
+ Func, IIncludableQueryable> defaultIncludeBuilder = null
+ ) : base(
+ logger,
+ appConfiguration,
+ identityProvider,
+ validationProvider,
+ provider,
+ defaultOrderBuilder,
+ defaultIncludeBuilder
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xCategoryService\Controllers\XCategoryServiceControllerBase.cs
+
+using System;
+using System.Linq;
+using Microsoft.EntityFrameworkCore.Query;
+using Microsoft.Extensions.Logging;
+using xCategoryService.Interfaces.Dtos;
+using xCategoryService.Models.Dtos;
+using xCategoryService.Models.Entities;
+using xCommons.Configurations;
+using xCommons.Providers;
+using xDataService.Controllers;
+using xDataService.Interfaces;
+
+namespace xCategoryService.Controllers
+{
+ public abstract class XCategoryServiceControllerBase : XBaseServiceController, IXBaseServiceController
+ {
+ protected XCategoryServiceControllerBase(
+ ILogger logger,
+ XAppConfiguration appConfiguration,
+ XValidationProvider validationProvider,
+ IXCategoryRepositoryService repositoryService,
+ Func, IOrderedQueryable> defaultOrderBuilder = null,
+ Func, IIncludableQueryable> defaultIncludeBuilder = null
+ ) : base(
+ logger,
+ appConfiguration,
+ validationProvider,
+ repositoryService,
+ defaultOrderBuilder,
+ defaultIncludeBuilder
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xCategoryService\Controllers\XCategoryServiceProviderControllerBase.cs
+
+using System;
+using System.Linq;
+using Microsoft.EntityFrameworkCore.Query;
+using Microsoft.Extensions.Logging;
+using xCategoryService.Interfaces.Dtos;
+using xCategoryService.Models.Dtos;
+using xCategoryService.Models.Entities;
+using xCategoryService.Providers.Dtos;
+using xCommons.Configurations;
+using xCommons.Providers;
+using xIdentityService.Interfaces;
+using xPushService.Controllers;
+using xPushService.Interfaces;
+
+namespace xCategoryService.Controllers
+{
+ public abstract class XCategoryServiceProviderControllerBase : XBaseServiceProviderController, IXBaseServiceProviderController
+ {
+ protected XCategoryServiceProviderControllerBase(
+ ILogger logger,
+ XAppConfiguration appConfiguration,
+ IXIdentityProvider identityProvider,
+ XValidationProvider validationProvider,
+ IXCategoryServiceProvider provider,
+ Func, IOrderedQueryable> defaultOrderBuilder = null,
+ Func, IIncludableQueryable> defaultIncludeBuilder = null
+ ) : base(
+ logger,
+ appConfiguration,
+ identityProvider,
+ validationProvider,
+ provider,
+ defaultOrderBuilder,
+ defaultIncludeBuilder
+ )
+ { }
+ }
+}
+
+### FILE: C:\Users\SaherElm\Documents\Projects\xSaherelmWorkspace\Modules\xCategoryService\Controllers\XSubCategoryProviderControllerBase.cs
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.EntityFrameworkCore.Query;
+using Microsoft.Extensions.Logging;
+using xCategoryService.Interfaces;
+using xCategoryService.Models.Dtos;
+using xCategoryService.Models.Entities;
+using xCategoryService.Providers.Dtos;
+using xCommons.Configurations;
+using xCommons.Extensions;
+using xCommons.Providers;
+using xExceptions.Constants;
+using xIdentityService.Interfaces;
+using xModels.Dtos;
+using xPushService.Controllers;
+
+namespace xCategoryService.Controllers
+{
+ public abstract class XSubCategoryProviderControllerBase : XBaseProvidedController, IXSubCategoryProviderController
+ {
+ private readonly IXSubCategoryProvider provider;
+
+ protected XSubCategoryProviderControllerBase(
+ ILogger logger,
+ XAppConfiguration appConfiguration,
+ IXIdentityProvider identityProvider,
+ XValidationProvider validationProvider,
+ IXSubCategoryProvider provider,
+ Func, IOrderedQueryable> defaultOrderBuilder = null,
+ Func