public async Task <IEnumerable <TModel> > GetList() { var x = await _context.Set <TEntity>().AsNoTracking().ToListAsync(); return(_mapper.MapListTo <TModel, TEntity>(x)); }
public BaseRepository(DoLittleDbContext context, IMapperExtension mapper) { _mapper = mapper; _context = context; _dbSet = _context.Set <TEntity>(); }