Skip to content

Instantly share code, notes, and snippets.

@jpolvora
Created November 8, 2011 21:09
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jpolvora/1349236 to your computer and use it in GitHub Desktop.
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