public Int32 Edit(PERFIL perfil, LOG log)
 {
     using (DbContextTransaction transaction = Db.Database.BeginTransaction(IsolationLevel.ReadCommitted))
     {
         try
         {
             PERFIL obj = _perfilRepository.GetById(perfil.PERF_CD_ID);
             _perfilRepository.Detach(obj);
             _logRepository.Add(log);
             _perfilRepository.Update(perfil);
             transaction.Commit();
             return(0);
         }
         catch (Exception ex)
         {
             transaction.Rollback();
             throw ex;
         }
     }
 }