using CMSDAL.DTO.SitePage; using GB5Shared.DTO.Framework.Login; using System.Data.Common; namespace CMSDAL.CustomCode.SitePage; public interface ISitePageDAL { Task GetSitePage(int sitePageId, LoginDTO loginDTO, CancellationToken ct = default); // Route-resolution primitive GetSiteDocument is built on. Returns null if no active page // is bound to that (SiteId, UrlPath). Task GetRouteByUrlPathAsync(int siteId, string urlPath, LoginDTO loginDTO, CancellationToken ct = default); // Resolves the system-shared 'SITE_PAGES' Space + 'site-page' ContentType a new page's // Content row belongs to. Task<(int ContentTypeId, int SpaceId)> GetSitePageContentTypeAsync(LoginDTO loginDTO, CancellationToken ct = default); // Transaction-aware — must be called from inside ExecuteSaveAsync's persistFunc, alongside // the Content row save, so both commit or roll back together. Task SaveSitePage(SitePageDTO dto, LoginDTO loginDTO, DbTransaction? tx = null, CancellationToken ct = default); Task UpdateSitePage(SitePageDTO dto, LoginDTO loginDTO, DbTransaction? tx = null, CancellationToken ct = default); Task DeleteSitePage(int sitePageId, LoginDTO loginDTO, CancellationToken ct = default); }