Exemple #1
0
 public Int32 Edit(MENSAGEM item, LOG log, Int32?idAss)
 {
     using (DbContextTransaction transaction = Db.Database.BeginTransaction(IsolationLevel.ReadCommitted))
     {
         try
         {
             MENSAGEM obj = _baseRepository.GetById(item.MENS_CD_ID);
             _baseRepository.Detach(obj);
             _logRepository.Add(log);
             _baseRepository.Update(item);
             transaction.Commit();
             return(0);
         }
         catch (Exception ex)
         {
             transaction.Rollback();
             throw ex;
         }
     }
 }