last ...
This commit is contained in:
@@ -4,6 +4,9 @@ using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using MongoDB.Bson.Serialization.Conventions;
|
||||
using xAiApi.AI.DataHelper.Events;
|
||||
using xAiApi.AI.Interfaces.Entities;
|
||||
using xAiApi.AI.Models.Entities;
|
||||
using xAiApi.Data.Events;
|
||||
using xAiApi.Data.Extensions;
|
||||
using xAiApi.Data.Interfaces;
|
||||
@@ -105,6 +108,18 @@ namespace xAiApi.Data.Helpers
|
||||
//
|
||||
// XTest ...
|
||||
services.Add(new ServiceDescriptor(typeof(IXTestEvents), typeof(XTestEvents), ServiceLifetime.Singleton));
|
||||
|
||||
//
|
||||
// XAiProject ...
|
||||
services.Add(new ServiceDescriptor(typeof(IXAiProjectEvents), typeof(XAiProjectEvents), ServiceLifetime.Singleton));
|
||||
|
||||
//
|
||||
// XAiMessage ...
|
||||
services.Add(new ServiceDescriptor(typeof(IXAiMessageEvents), typeof(XAiMessageEvents), ServiceLifetime.Singleton));
|
||||
|
||||
//
|
||||
// XAiConversation ...
|
||||
services.Add(new ServiceDescriptor(typeof(IXAiConversationEvents), typeof(XAiConversationEvents), ServiceLifetime.Singleton));
|
||||
#endregion
|
||||
|
||||
//
|
||||
@@ -120,6 +135,18 @@ namespace xAiApi.Data.Helpers
|
||||
//
|
||||
// XTest ...
|
||||
services.Add(new ServiceDescriptor(typeof(IXTestRepository), typeof(XTestEfRepository<XAiApiDbContext>), lifetime));
|
||||
|
||||
//
|
||||
// XAiProject ...
|
||||
services.Add(new ServiceDescriptor(typeof(IXAiProjectRepository), typeof(XAiProjectEfRepository<XAiApiDbContext>), lifetime));
|
||||
|
||||
//
|
||||
// XAiMessage ...
|
||||
services.Add(new ServiceDescriptor(typeof(IXAiMessageRepository), typeof(XAiMessageEfRepository<XAiApiDbContext>), lifetime));
|
||||
|
||||
//
|
||||
// XAiConversation ...
|
||||
services.Add(new ServiceDescriptor(typeof(IXAiConversationRepository), typeof(XAiConversationEfRepository<XAiApiDbContext>), lifetime));
|
||||
break;
|
||||
|
||||
//
|
||||
@@ -127,6 +154,18 @@ namespace xAiApi.Data.Helpers
|
||||
//
|
||||
// XTest ...
|
||||
services.Add(new ServiceDescriptor(typeof(IXTestRepository), typeof(XTestMongoRepository), lifetime));
|
||||
|
||||
//
|
||||
// XAiProject ...
|
||||
services.Add(new ServiceDescriptor(typeof(IXAiProjectRepository), typeof(XAiProjectMongoRepository), lifetime));
|
||||
|
||||
//
|
||||
// XAiMessage ...
|
||||
services.Add(new ServiceDescriptor(typeof(IXAiMessageRepository), typeof(XAiMessageMongoRepository), lifetime));
|
||||
|
||||
//
|
||||
// XAiConversation ...
|
||||
services.Add(new ServiceDescriptor(typeof(IXAiConversationRepository), typeof(XAiConversationMongoRepository), lifetime));
|
||||
break;
|
||||
|
||||
//
|
||||
@@ -145,6 +184,9 @@ namespace xAiApi.Data.Helpers
|
||||
{
|
||||
//
|
||||
services.AddSingleton<IXKeyGenerator<XTest, int>, XIntKeyGenerator<XTest>>();
|
||||
services.AddSingleton<IXKeyGenerator<XAiProject, Guid>, XGuidKeyGenerator<XAiProject>>();
|
||||
services.AddSingleton<IXKeyGenerator<XAiMessage, Guid>, XGuidKeyGenerator<XAiMessage>>();
|
||||
services.AddSingleton<IXKeyGenerator<XAiConversation, Guid>, XGuidKeyGenerator<XAiConversation>>();
|
||||
}
|
||||
|
||||
public void AddDbSeederConfiguration(
|
||||
|
||||
Reference in New Issue
Block a user