using GB5Shared.DTO.Ice; using GB5Shared.DTO.Framework.Login; using IceImportBLL.EntityPersistenceAdapter; using IceImportDAL.DTO.IceImportPipeline; namespace IceImportBLL.UpsertDecisionService; public class UpsertDecisionDTO { public bool IsUpdate { get; set; } public int? ExistingId { get; set; } public int? ExistingVersion { get; set; } } // Given a row and its selected IEntityPersistenceAdapter, calls FindByNaturalKeyAsync and returns // whether to Save (insert) or Update, plus the existing id/version if found. public interface IUpsertDecisionService { Task DecideAsync( MappedEntityRowDTO row, IceMapDTO mapDefinition, IEntityPersistenceAdapter adapter, LoginDTO login, long runId, CancellationToken ct); }