#region ========================================================================= USING =====================================================================================
using System.Threading;
using System.Threading.Tasks;
#endregion
namespace Lumina.Application.Common.DataAccess.UoW;
///
/// Interaction boundary with the Data Access Layer.
///
public interface IUnitOfWork
{
///
/// Exposes a repository of type to the Business Layer.
///
/// The type of the exposed repository.
/// A repository of type .
TRepository GetRepository();
///
/// Saves all changes made to the database.
///
/// Cancellation token that can be used to stop the execution.
Task SaveChangesAsync(CancellationToken cancellationToken);
///
/// Opens a transaction.
///
void OpenTransaction();
///
/// Commits a transaction.
///
void CommitTransaction();
}