using CMSDAL.DTO.ContentVersion; using GB5Shared.DTO.Framework.Login; using System.Data.Common; namespace CMSDAL.CustomCode.ContentVersion; public interface IContentVersionDAL { Task GetByContentAsync(int contentId, LoginDTO loginDTO, CancellationToken ct); Task SaveAsync(ContentVersionDTO dto, LoginDTO loginDTO, CancellationToken ct); Task RestoreVersionAsync(int contentVersionId, int contentId, LoginDTO loginDTO, CancellationToken ct); // Transaction-aware snapshot insert — computes the next version number and inserts in the // same statement/transaction as the caller's own entity save (see // ContentVersionQB.INSERT_WITH_NEXT_VERSION). Used from inside ContentBLL's // ExecuteSaveAsync persistFunc so a workflow transition's status update and its version // snapshot commit or roll back together. Task SaveWithAutoVersionAsync(ContentVersionDTO dto, LoginDTO loginDTO, DbTransaction tx, CancellationToken ct); }