private void CleanOneTable <T>() where T : class { //string QUERY = "TRUNCATE TABLE [" + typeof(T).Name + "]"; _context.Set <T>().RemoveRange(_context.Set <T>()); }
public async Task Create(TEntity entity) { await _context.Set <TEntity>().AddAsync(entity); await _context.SaveChangesAsync(); }