DataAccess
IRepositories
public interface IGenericRepository<TEntity> where TEntity : class
{
TEntity Get(int Id);
IEnumerable<TEntity> GetAll();
void Add(TEntity entity);
void Delete(TEntity entity);
void Update(TEntity entity);
}
public abstract class GenericRepository<TEntity> : IGenericRepository<TEntity> where TEntity : class
{
protected IDbConnection Connection;
protected GenericRepository(IDbConnection connection)
{
Connection = connection;
}
public virtual void Add(TEntity entity)
{
throw new System.NotImplementedException();
}
public virtual void Delete(TEntity entity)
{
throw new System.NotImplementedException();
}
public virtual TEntity Get(int Id)
{
throw new System.NotImplementedException();
}
public virtual IEnumerable<TEntity> GetAll()
{
throw new System.NotImplementedException();
}
public virtual void Update(TEntity entity)
{
throw new System.NotImplementedException();
}
}