Exemple #1
0
 public int Atualizar(T dados)
 {
     try{
         _dbContext.Set <T>().Update(dados);
         return(_dbContext.SaveChanges());
     } catch (Exception ex) {
         throw new Exception(ex.Message);
     }
 }
 public int Atualizar(T dados)
 {
     try
     {
         _DBContext.Set <T>().Update(dados);
         return(_DBContext.SaveChanges()); //retorna numero de linhas afetadas
     }
     catch (System.Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }