feat(templates): GetTemplateStubsAsync untracked identity/edge projection

This commit is contained in:
Joseph Doherty
2026-10-22 06:06:27 -04:00
parent 15c9de0f4a
commit 6bcca4b344
4 changed files with 57 additions and 0 deletions
@@ -90,6 +90,16 @@ public class TemplateEngineRepository : ITemplateEngineRepository
.ToListAsync(cancellationToken);
}
/// <inheritdoc />
public async Task<IReadOnlyList<TemplateStub>> GetTemplateStubsAsync(CancellationToken cancellationToken = default)
{
return await _context.Templates
.AsNoTracking()
.OrderBy(t => t.Name)
.Select(t => new TemplateStub(t.Id, t.Name, t.ParentTemplateId, t.FolderId, t.IsDerived, t.OwnerCompositionId))
.ToListAsync(cancellationToken);
}
/// <inheritdoc />
// Two deliberate departures from <see cref="GetAllTemplatesAsync"/>:
// <list type="number">