示例#1
0
 public GenericRepository(TravelCompanyDBContext context)
 {
     _context = context;
     _set     = context.Set <TEntity>();
 }
 public async Task <bool> IsExist(TEntity entity, CancellationToken cancellationToken)
 {
     return(await _context.Set <TEntity>().ContainsAsync(entity, cancellationToken));
 }