This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace Metavision.Infra.Data | |
{ | |
public interface IRepositorio : IDisposable | |
{ | |
bool HasChanges { get; set; } | |
IUnitOfWork UnitOfWork { get; } | |
} | |
public interface IRepositorio<T> : IRepositorio where T : class, new() | |
{ | |
Func<T> Factory { get; } | |
T CreateNew(); | |
void AddEntity(T entity); | |
void RemoveEntity(T entity); | |
T GetEntityByKey(params object[] key); | |
T GetEntity(Func<T, Boolean> specification = null); | |
IEnumerable<T> GetAll(Func<T, bool> specification = null); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment