public void Save() { using (TransactionScope tScope = new TransactionScope()) { _context.SaveChanges(); tScope.Complete(); } }
public virtual TEntity Adicionar(TEntity entity) { _dbContext.Set <TEntity>().Add(entity); _dbContext.SaveChanges(); return(entity); }