Commit Graph

5 Commits

Author SHA1 Message Date
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
26ea1db09f feat(infrastructure): implement ISQLExecutor with EF6/EF Core support
- Move ISQLExecutor interface from Application to Domain layer
  - Follow Clean Architecture: Infrastructure references Domain, not Application
  - Namespace: ECMJobRunner.Domain.Interfaces
- Implement SQLExecutor service with conditional compilation
  - EF6 (net480): Database.SqlQuery<T>()
  - EF Core (net8.0): Database.SqlQueryRaw<T>()
- Register ISQLExecutor in DI (AddInfrastructure, AddInfrastructureInMemory)
  - Scoped lifetime (aligns with DbContext)
2026-07-11 16:43:57 +02:00
9bae0ab95c Refactor Repository and update project dependencies
Added `SaveChangesAsync` to `IRepository` for async persistence.
Introduced AutoMapper and DbContext dependencies in `Repository`.
Simplified EF Core operations by removing `#if NET48` logic.
Replaced `Task.Run` with direct EF Core calls for .NET Framework.
Updated AutoMapper version for .NET 8 and added EF Core testing.
Suppressed AutoMapper vulnerability warning in project file.
Performed general cleanup and improved maintainability.
2026-07-09 15:58:33 +02:00
5eca5f1d4b Remove SaveChangesAsync from IRepository interface
The `SaveChangesAsync` method was removed from the `IRepository`
interface in the `ECMJobRunner.Domain.Interfaces` namespace.
This method previously allowed saving all changes asynchronously
with an optional `CancellationToken` parameter.
2026-07-09 15:44:40 +02:00
3e007ccfeb Refactor domain layer to follow Clean Architecture
Updated the domain layer to align with Clean Architecture principles:
- Removed Entity Framework dependencies from the project.
- Updated AGENTS.md to document the new architecture.
- Introduced repository interfaces for data access abstraction.
- Added a generic IRepository interface for CRUD operations.
- Implemented entity-specific repositories for Profile, ProfileSqlJob, and ProfileHistory.
- Ensured the domain layer is infrastructure-independent with pure POCOs.
- Updated project structure and documentation for clarity.
2026-07-09 13:33:39 +02:00