using GB5Shared.DTO.Framework.Login; using RecruitmentDAL.DTO.CandidateDemographic; using System.Data.Common; using System.Threading; using System.Threading.Tasks; namespace RecruitmentDAL.CustomeCode.CandidateDemographic { public interface ICandidateDemographicDAL { // Internal upsert-lookup only — returns the typed DTO directly (not JSON) because this // is never surfaced through an API response, only consumed by // CandidateDemographicBLL.SaveCandidateDemographic to decide insert vs update. Returns // null when no active row exists yet for this Candidate. Task GetByCandidateId(int CandidateId, LoginDTO LoginDTO, CancellationToken ct); // Transactional write overloads — called from BaseEntityAppService.ExecuteSaveAsync's // persistFunc so the save participates in the single pipeline transaction. Task SaveCandidateDemographic(CandidateDemographicDTO CandidateDemographicDTO, LoginDTO LoginDTO, DbTransaction tx, CancellationToken ct); Task UpdateCandidateDemographic(CandidateDemographicDTO CandidateDemographicDTO, LoginDTO LoginDTO, DbTransaction tx, CancellationToken ct); Task DeleteCandidateDemographic(int CandidateDemographicId, LoginDTO LoginDTO, CancellationToken ct); } }