apply fix on Models Enrichments ...
This commit is contained in:
@@ -1,222 +1,68 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
using xAiModels.Models.Dtos;
|
||||
using xAiModels.Models.Entities;
|
||||
using xDataService.Interfaces;
|
||||
using xModels.Dtos;
|
||||
|
||||
namespace xAiModels.Interfaces.Dtos
|
||||
{
|
||||
public interface IXAiConversationRepositoryService : IXBaseRepositoryService<XAiConversation, XAiConversationDto, Guid>
|
||||
{
|
||||
//
|
||||
#region Actions ...
|
||||
//
|
||||
#region Add ...
|
||||
#region Enrichers ...
|
||||
/// <summary>
|
||||
/// add a new Dto ...
|
||||
/// Enrich Specified Item ...
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
/// <param name="saveChanges"></param>
|
||||
/// <param name="source"></param>
|
||||
/// <param name="fillMessages"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<XAiConversationDto> AddAsync(
|
||||
XAiConversationDto item,
|
||||
bool saveChanges = true,
|
||||
bool fillMessages = true,
|
||||
Task<XAiConversationDto> Enrich(
|
||||
XAiConversation source,
|
||||
bool fillMessages = false,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// add or update a Dto (add if not exists/update if exists) ...
|
||||
/// Enrich Specified Item ...
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
/// <param name="saveChanges"></param>
|
||||
/// <param name="source"></param>
|
||||
/// <param name="fillMessages"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<XAiConversationDto> AddOrUpdateAsync(
|
||||
XAiConversationDto item,
|
||||
bool saveChanges = true,
|
||||
bool fillMessages = true,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
#endregion
|
||||
|
||||
//
|
||||
#region Update ...
|
||||
/// <summary>
|
||||
/// Update an Dto values ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="item"></param>
|
||||
/// <param name="saveChanges"></param>
|
||||
/// <param name="fillMessages"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<XAiConversationDto> UpdateAsync(
|
||||
Guid id,
|
||||
XAiConversationDto item,
|
||||
bool saveChanges = true,
|
||||
bool fillMessages = true,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
#endregion
|
||||
|
||||
//
|
||||
#region Remove ...
|
||||
/// <summary>
|
||||
/// remove an Dto by it's Id ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="softDelete"></param>
|
||||
/// <param name="saveChanges"></param>
|
||||
/// <param name="fillMessages"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<XAiConversationDto> RemoveAsync(
|
||||
Guid id,
|
||||
bool softDelete = false,
|
||||
bool saveChanges = true,
|
||||
bool fillMessages = true,
|
||||
Task<XAiConversationDto> Enrich(
|
||||
XAiConversationDto source,
|
||||
bool fillMessages = false,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// remove an Dto ...
|
||||
/// Enrich Specified Items ...
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
/// <param name="softDelete"></param>
|
||||
/// <param name="saveChanges"></param>
|
||||
/// <param name="sources"></param>
|
||||
/// <param name="fillMessages"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<XAiConversationDto> RemoveAsync(
|
||||
XAiConversationDto item,
|
||||
bool softDelete = false,
|
||||
bool saveChanges = true,
|
||||
bool fillMessages = true,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
#endregion
|
||||
|
||||
//
|
||||
#region Retrieve ...
|
||||
/// <summary>
|
||||
/// retrieve an Dto by it's Id ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="ignoreSoftDeleteds"></param>
|
||||
/// <param name="includeBuilder"></param>
|
||||
/// <param name="fillMessages"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<XAiConversationDto> GetAsync(
|
||||
Guid id,
|
||||
bool ignoreSoftDeleteds = true,
|
||||
Func<IQueryable<XAiConversation>, IIncludableQueryable<XAiConversation, object>> includeBuilder = null,
|
||||
bool fillMessages = true,
|
||||
Task<IEnumerable<XAiConversationDto>> EnrichRange(
|
||||
IEnumerable<XAiConversation> sources,
|
||||
bool fillMessages = false,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// retrieve all exists Dtos ...
|
||||
/// Enrich Specified Items ...
|
||||
/// </summary>
|
||||
/// <param name="ignoreSoftDeleteds"></param>
|
||||
/// <param name="orderBuilder"></param>
|
||||
/// <param name="includeBuilder"></param>
|
||||
/// <param name="sources"></param>
|
||||
/// <param name="fillMessages"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<XAiConversationDto>> GetAllAsync(
|
||||
bool ignoreSoftDeleteds = true,
|
||||
Func<IQueryable<XAiConversation>, IOrderedQueryable<XAiConversation>> orderBuilder = null,
|
||||
Func<IQueryable<XAiConversation>, IIncludableQueryable<XAiConversation, object>> includeBuilder = null,
|
||||
bool fillMessages = true,
|
||||
Task<IEnumerable<XAiConversationDto>> EnrichRange(
|
||||
IEnumerable<XAiConversationDto> sources,
|
||||
bool fillMessages = false,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// retrieve all exists Dtos
|
||||
/// as Async Enumerable ...
|
||||
/// </summary>
|
||||
/// <param name="ignoreSoftDeleteds"></param>
|
||||
/// <param name="orderBuilder"></param>
|
||||
/// <param name="includeBuilder"></param>
|
||||
/// <param name="fillMessages"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
IAsyncEnumerable<XAiConversationDto> GetAllAsAsyncEnumerable(
|
||||
bool ignoreSoftDeleteds = true,
|
||||
Func<IQueryable<XAiConversation>, IOrderedQueryable<XAiConversation>> orderBuilder = null,
|
||||
Func<IQueryable<XAiConversation>, IIncludableQueryable<XAiConversation, object>> includeBuilder = null,
|
||||
bool fillMessages = true,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// find an Dto by providing a Conditional Expression ...
|
||||
/// </summary>
|
||||
/// <param name="predicate"></param>
|
||||
/// <param name="ignoreSoftDeleteds"></param>
|
||||
/// <param name="includeBuilder"></param>
|
||||
/// <param name="fillMessages"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<XAiConversationDto> FindOneAsync(
|
||||
Expression<Func<XAiConversation, bool>> predicate,
|
||||
bool ignoreSoftDeleteds = true,
|
||||
Func<IQueryable<XAiConversation>, IIncludableQueryable<XAiConversation, object>> includeBuilder = null,
|
||||
bool fillMessages = true,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// find a collection of Dtos by proving a Conditional Expression ...
|
||||
/// </summary>
|
||||
/// <param name="predicate"></param>
|
||||
/// <param name="ignoreSoftDeleteds"></param>
|
||||
/// <param name="orderBuilder"></param>
|
||||
/// <param name="includeBuilder"></param>
|
||||
/// <param name="fillMessages"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<XAiConversationDto>> FindManyAsync(
|
||||
Expression<Func<XAiConversation, bool>> predicate,
|
||||
bool ignoreSoftDeleteds = true,
|
||||
Func<IQueryable<XAiConversation>, IOrderedQueryable<XAiConversation>> orderBuilder = null,
|
||||
Func<IQueryable<XAiConversation>, IIncludableQueryable<XAiConversation, object>> includeBuilder = null,
|
||||
bool fillMessages = true,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// retrieve Dtos based on XQuery Pagination structure ...
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <param name="ignoreSoftDeleteds"></param>
|
||||
/// <param name="predicate"></param>
|
||||
/// <param name="orderBuilder"></param>
|
||||
/// <param name="includeBuilder"></param>
|
||||
/// <param name="fillMessages"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<XQueryResult<XAiConversationDto>> QueryAsync(
|
||||
XQuery query,
|
||||
bool ignoreSoftDeleteds = true,
|
||||
Expression<Func<XAiConversation, bool>> predicate = null,
|
||||
Func<IQueryable<XAiConversation>, IOrderedQueryable<XAiConversation>> orderBuilder = null,
|
||||
Func<IQueryable<XAiConversation>, IIncludableQueryable<XAiConversation, object>> includeBuilder = null,
|
||||
bool fillMessages = true,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
#endregion
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user