-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIBaseRepository.cs
More file actions
47 lines (38 loc) · 1.22 KB
/
IBaseRepository.cs
File metadata and controls
47 lines (38 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System.Threading;
using System.Threading.Tasks;
namespace Birko.Data.Repositories
{
#region Delegate
/// <summary>
/// Delegate for processing repository data during operations.
/// </summary>
/// <typeparam name="TModel">The type of data model.</typeparam>
public delegate TModel ProcessDataDelegate<TModel>(TModel data)
where TModel : Models.AbstractModel;
#endregion
#region Base Repository Interface
/// <summary>
/// Defines the base lifecycle operations for repositories.
/// </summary>
public interface IBaseRepository
{
/// <summary>
/// Destroys the repository and releases all resources.
/// </summary>
void Destroy();
}
#endregion
#region Base Async Repository Interface
/// <summary>
/// Defines the base lifecycle operations for async repositories.
/// </summary>
public interface IAsyncBaseRepository
{
/// <summary>
/// Asynchronously destroys the repository and releases all resources.
/// </summary>
/// <param name="ct">A cancellation token to cancel the operation.</param>
Task DestroyAsync(CancellationToken ct = default);
}
#endregion
}