File size: 735 Bytes
de8b914
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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);
}