46 lines
1.3 KiB
C#
46 lines
1.3 KiB
C#
using System;
|
|
using System.Linq;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using xAiApi.AI.Interfaces.Entities;
|
|
using xAiApi.AI.Models.Entities;
|
|
using xDataService.Configuration;
|
|
using xDataService.Db;
|
|
using xDataService.EFRepositories;
|
|
using xDataService.Interfaces;
|
|
|
|
namespace xAiApi.Data.Repositories.Ef
|
|
{
|
|
/// <summary>
|
|
/// a Repository Pattern Implementation for
|
|
/// manipulating AiMessage ...
|
|
/// </summary>
|
|
/// <typeparam name="TDbContext"></typeparam>
|
|
public class XAiMessageEfRepository<TDbContext> : XBaseEFRepository<XAiMessage, Guid, XAiApiDbContext>, IXAiMessageRepository
|
|
where TDbContext : XDbContext
|
|
{
|
|
//
|
|
public XAiMessageEfRepository(
|
|
IXUnitOfWorks<XAiApiDbContext> unitOfWorks,
|
|
XDataServiceConfiguration configuration,
|
|
IXKeyGenerator<XAiMessage, Guid> keyGenerator = null,
|
|
IXAiMessageEvents baseRepositoryEvents = null
|
|
) : base(
|
|
unitOfWorks,
|
|
configuration,
|
|
keyGenerator,
|
|
baseRepositoryEvents
|
|
)
|
|
{ }
|
|
|
|
public override IQueryable<XAiMessage> GetFullDbSet()
|
|
{
|
|
//
|
|
return dbSet
|
|
.Include(x => x.Conversation);
|
|
}
|
|
|
|
//
|
|
#region Special ...
|
|
#endregion
|
|
}
|
|
} |