Files
ECMJobRunner/ECMJobRunner.Domain/Interfaces/ICfgProfileRepository.cs
TekH eaf24e05ee refactor(application): consolidate query architecture with AutoMapper integration
- Add AutoMapper profile for CfgProfile and ProfileSqlJob entity-to-DTO mappings
- Consolidate GetProfileByIdQuery and GetAllActiveProfilesQuery into unified GetProfileQuery
- Implement flexible filtering with nullable query options (Id, Active, TypeId, ProfileName)
- Add IncludeSqlJobs option for optimized SQL job loading
- Move CfgProfileDto to Common/Dtos for better architecture alignment
- Add comprehensive unit tests for GetProfileQuery with multiple filter scenarios
- Move ISQLExecutor interface from Domain to Application layer
- Add GetByIdWithSqlJobsAsync and GetAllActiveWithSqlJobsAsync to repository
2026-07-11 19:14:51 +02:00

29 lines
1.1 KiB
C#

using ECMJobRunner.Domain.Entities;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace ECMJobRunner.Domain.Interfaces
{
/// <summary>
/// Repository interface for CfgProfile entity
/// </summary>
public interface ICfgProfileRepository : IRepository<CfgProfile>
{
/// <summary>
/// Gets a profile by ID with associated SQL jobs eagerly loaded
/// </summary>
/// <param name="id">Profile ID</param>
/// <param name="cancellationToken">Cancellation token</param>
/// <returns>Profile with SQL jobs or null if not found</returns>
Task<CfgProfile?> GetByIdWithSqlJobsAsync(long id, CancellationToken cancellationToken = default);
/// <summary>
/// Gets all active profiles with associated SQL jobs eagerly loaded
/// </summary>
/// <param name="cancellationToken">Cancellation token</param>
/// <returns>List of active profiles with SQL jobs</returns>
Task<List<CfgProfile>> GetAllActiveWithSqlJobsAsync(CancellationToken cancellationToken = default);
}
}