Ver por etiquetas

El respositorio genérico.Un Derrochador en épocas de crisis.
Published 7/6/2012 11:56 | Pedro Hurtado
Durante muchos días,semanas,meses e incluso años he visto la siguiente definición de un repositorio. 1. Interface IRepository. 1: public interface IRepository<T> where T: class 2: { 3: T Get( int Id); 4: T Insert(T Entity); 5: void Update(T Entity); 6: void Delete(T Entity); 7: IEnumerable<T> GetAll(); 8: 9: IUnitOfWork UnifOfWork { get;} 10: } 2. Interface IUnitOfWork 1: public interface IUnitOfWork 2: { 3: void Commit(); 4: void RollBack(); 5: } 3. Interface IContext...