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 IXAiProjectRepositoryService : IXBaseRepositoryService { // #region Actions ... // #region Add ... /// /// add a new Dto ... /// /// /// /// /// /// /// Task AddAsync( XAiProjectDto item, bool saveChanges = true, bool fillConversations = true, bool fillConversationMessages = true, CancellationToken cancellationToken = default ); /// /// add or update a Dto (add if not exists/update if exists) ... /// /// /// /// /// /// /// Task AddOrUpdateAsync( XAiProjectDto item, bool saveChanges = true, bool fillConversations = true, bool fillConversationMessages = true, CancellationToken cancellationToken = default ); #endregion // #region Update ... /// /// Update an Dto values ... /// /// /// /// /// /// /// /// Task UpdateAsync( Guid id, XAiProjectDto item, bool saveChanges = true, bool fillConversations = true, bool fillConversationMessages = true, CancellationToken cancellationToken = default ); #endregion // #region Remove ... /// /// remove an Dto by it's Id ... /// /// /// /// /// /// /// /// Task RemoveAsync( Guid id, bool softDelete = false, bool saveChanges = true, bool fillConversations = true, bool fillConversationMessages = true, CancellationToken cancellationToken = default ); /// /// remove an Dto ... /// /// /// /// /// /// /// /// Task RemoveAsync( XAiProjectDto item, bool softDelete = false, bool saveChanges = true, bool fillConversations = true, bool fillConversationMessages = true, CancellationToken cancellationToken = default ); #endregion // #region Retrieve ... /// /// retrieve an Dto by it's Id ... /// /// /// /// /// /// /// /// Task GetAsync( Guid id, bool ignoreSoftDeleteds = true, Func, IIncludableQueryable> includeBuilder = null, bool fillConversations = true, bool fillConversationMessages = true, CancellationToken cancellationToken = default ); /// /// retrieve all exists Dtos ... /// /// /// /// /// /// /// /// Task> GetAllAsync( bool ignoreSoftDeleteds = true, Func, IOrderedQueryable> orderBuilder = null, Func, IIncludableQueryable> includeBuilder = null, bool fillConversations = true, bool fillConversationMessages = true, CancellationToken cancellationToken = default ); /// /// retrieve all exists Dtos /// as Async Enumerable ... /// /// /// /// /// /// /// /// IAsyncEnumerable GetAllAsAsyncEnumerable( bool ignoreSoftDeleteds = true, Func, IOrderedQueryable> orderBuilder = null, Func, IIncludableQueryable> includeBuilder = null, bool fillConversations = true, bool fillConversationMessages = true, CancellationToken cancellationToken = default ); /// /// find an Dto by providing a Conditional Expression ... /// /// /// /// /// /// /// /// Task FindOneAsync( Expression> predicate, bool ignoreSoftDeleteds = true, Func, IIncludableQueryable> includeBuilder = null, bool fillConversations = true, bool fillConversationMessages = true, CancellationToken cancellationToken = default ); /// /// find a collection of Dtos by proving a Conditional Expression ... /// /// /// /// /// /// /// /// /// Task> FindManyAsync( Expression> predicate, bool ignoreSoftDeleteds = true, Func, IOrderedQueryable> orderBuilder = null, Func, IIncludableQueryable> includeBuilder = null, bool fillConversations = true, bool fillConversationMessages = true, CancellationToken cancellationToken = default ); /// /// retrieve Dtos based on XQuery Pagination structure ... /// /// /// /// /// /// /// /// /// /// Task> QueryAsync( XQuery query, bool ignoreSoftDeleteds = true, Expression> predicate = null, Func, IOrderedQueryable> orderBuilder = null, Func, IIncludableQueryable> includeBuilder = null, bool fillConversations = true, bool fillConversationMessages = true, CancellationToken cancellationToken = default ); #endregion #endregion } }