-
Notifications
You must be signed in to change notification settings - Fork 0
/
IUnidadDeTrabajo.cs
52 lines (46 loc) · 1.82 KB
/
IUnidadDeTrabajo.cs
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
48
49
50
51
52
using System;
namespace Dominio.Core
{
public interface IUnidadDeTrabajo : IDisposable
{
/// <summary>
/// Confirma todos los cambios existentes en el contenedor (Commit)
/// </summary>
///<remarks>
/// Commit sobre la base de datos
/// Si la entidad posee propiedades reparadas y ocurre algún problema de persistencia optimista,
/// se levantará una excepción
///</remarks>
void Confirmar();
/// <summary>
/// Confirma todos los cambios existentes en el contenedor (Commit)
/// </summary>
///<remarks>
/// Commit sobre la base de datos
/// Si la entidad posee propiedades reparadas y ocurre algún problema de persistencia optimista,
/// se levantará una excepción
///</remarks>
void ConfirmarAutoDetectChangeDisabled();
/// <summary>
/// Confirma todos los cambios existentes en el contenedor (Commit)
/// </summary>
///<remarks>
/// Commit sobre la base de datos
/// Si hay un problema de concurrencia "refrescará" los datos del cliente. Aproximación "Client wins"
///</remarks>
void ConfirmarYRefrescarCambios();
/// <summary>
/// Confirma los cambios y genera registros asociados a auditoria de cambios para la entidad
/// </summary>
/// <param name="autor"></param>
void ConfirmarConAuditoria(string autor);
/// <summary>
/// Rollback de los cambios que se han producido en la Unit of Work y que están siendo observados por ella
/// </summary>
void DeshacerCambios();
/// <summary>
/// Refresca todas las entidades
/// </summary>
void RefrescarTodo();
}
}