mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 16:11:10 +00:00
Implements Data Access Layer
This commit is contained in:
1 parent
b69e59a3d8
commit
8b729cc16c
24 files changed
+1721
-9
No files matched your search
@@ -0,0 +1,32 @@
|
||||
namespace Lumina.Application.Common.DataAccess.UoW;
|
||||
|
||||
/// <summary>
|
||||
/// Interaction boundary with the Data Access Layer.
|
||||
/// </summary>
|
||||
public interface IUnitOfWork
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Exposes a repository of type <typeparamref name="TRepository"/> to the Business Layer.
|
||||
/// </summary>
|
||||
/// <typeparam name="TRepository">The type of the exposed repository.</typeparam>
|
||||
/// <returns>A repository of type <typeparamref name="TRepository"/>.</returns>
|
||||
TRepository GetRepository<TRepository>();
|
||||
|
||||
/// <summary>
|
||||
/// Saves all changes made to the database.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
Task SaveChangesAsync(CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Opens a transaction.
|
||||
/// </summary>
|
||||
void OpenTransaction();
|
||||
|
||||
/// <summary>
|
||||
/// Commits a transaction.
|
||||
/// </summary>
|
||||
void CommitTransaction();
|
||||
#endregion
|
||||
}
|
||||
Reference in new issue
Block a user