using System.Data.Common; using GB5Shared.DTO.Framework.Criteria; using GB5Shared.DTO.Framework.Login; using CRMSalesDAL.DTO.Deal; namespace CRMSalesDAL.CustomCode.Deal; public interface IDealDAL { Task GetDeal(int dealId, LoginDTO loginDTO, CancellationToken ct); Task GetSelectListDeal(CriteriaDTO criteriaDTO, LoginDTO loginDTO, CancellationToken ct); /// Current persisted Stage, or null if the Deal does not exist yet — used by DealBLL /// to detect a stage change on Update without loading the full row. Task GetDealStage(int dealId, LoginDTO loginDTO, CancellationToken ct); // Transactional write overloads — called from BaseEntityAppService.ExecuteSaveAsync's // persistFunc so the save participates in the single pipeline transaction. Task SaveDeal(DealDTO dealDTO, LoginDTO loginDTO, DbTransaction tx, CancellationToken ct); Task UpdateDeal(DealDTO dealDTO, LoginDTO loginDTO, DbTransaction tx, CancellationToken ct); Task DeleteDeal(int dealId, LoginDTO loginDTO, CancellationToken ct); }