Beispiel #1
0
 public IQueryable <TEntity> GetAll()
 {
     try
     {
         return(_payrollContext.Set <TEntity>());
     }
     catch (Exception ex)
     {
         throw new Exception($"Entity not found: {ex.Message}");
     }
 }
Beispiel #2
0
 public GenericRepository(PayrollContext context)
 {
     this.context = context;
     this.dbSet   = context.Set <TEntity>();
 }
Beispiel #3
0
 public virtual IQueryable <T> GetAll()
 {
     return(DbContext.Set <T>());
 }
 public EntityBaseRepository(IDbFactory dbFactory)
 {
     DbFactory = dbFactory;
     dbSet     = DbContext.Set <T>(); //*************************
 }
 public BaseRepository(PayrollContext context)
 {
     _context = context;
     _entity  = _context.Set <TEntity>();
 }