File size: 433 Bytes
de8b914
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using System.Data;

namespace SCM.Application.Common;

/// <summary>
/// Unidade de trabalho por requisição: mantém uma conexão aberta e permite
/// transações explícitas. Implementada em SCM.Infrastructure.
/// </summary>
public interface IUnitOfWork : IDisposable
{
    IDbConnection Connection { get; }
    IDbTransaction? CurrentTransaction { get; }

    void BeginTransaction();
    void Commit();
    void Rollback();
}