using System.Threading;
using System.Threading.Tasks;
namespace ECMJobRunner.Application.Common.Interfaces
{
///
/// Interface for executing SQL queries and mapping results to DTOs
///
public interface ISQLExecutor
{
///
/// Executes a SQL query and maps the result to the specified type
///
/// The type to map the query result to
/// The SQL query to execute
/// Cancellation token
/// The mapped result or null if no result
Task ExecuteQueryAsync(string sql, CancellationToken cancellationToken = default);
}
}