public async Task <IEnumerable <TEntity> > GetAllAsync() { return(await _context .Set <TEntity>() .AsNoTracking() .ToListAsync() .ConfigureAwait(false)); }
public E Create(E entity) { try { E output = _context.Set <E>().Add(entity); _context.SaveChanges(); return(output); } catch (DbUpdateException e) { CheckDbConstraintValidations(e, entity); throw e; } catch (Exception e) { throw e; } }