Beispiel #1
0
 /// <summary>
 /// 获取实体集合
 /// </summary>
 /// <returns></returns>
 public List <TEntity> GetAllList()
 {
     return(_dbContext.Set <TEntity>().ToList());
 }
Beispiel #2
0
 public async Task <TEntity> Get <TEntity>(Expression <Func <TEntity, bool> > where)
     where TEntity : class
 {
     return(await _dbContext.Set <TEntity>().FirstOrDefaultAsync(where));
 }