scm-api / src /SCM.Domain /Projects /IProjectRepository.cs
rafaeldavila's picture
Deploy SCM API (.NET 8) - Docker Space
de8b914 verified
Raw History Blame Contribute Delete
735 Bytes
namespace SCM.Domain.Projects;
/// <summary>Contrato de persistência de obras. Implementado em SCM.Infrastructure.</summary>
public interface IProjectRepository
{
Task<Project?> GetByIdAsync(Guid id, CancellationToken ct = default);
Task<(IReadOnlyList<Project> Items, long TotalItems)> GetPagedAsync(
int offset,
int pageSize,
string? search,
CancellationToken ct = default);
Task<bool> CodeExistsAsync(string code, Guid? excludeId = null, CancellationToken ct = default);
Task AddAsync(Project project, CancellationToken ct = default);
Task UpdateAsync(Project project, CancellationToken ct = default);
Task<bool> DeleteAsync(Guid id, CancellationToken ct = default);
}