public Int32 ValidateEditMetadado(METADADO_CLASSE item) { try { // Persiste return(_baseService.EditMetadado(item)); } catch (Exception ex) { throw; } }
public Int32 ValidateCreateMetadado(METADADO_CLASSE item) { try { // Persiste Int32 volta = _baseService.CreateMetadado(item); return(volta); } catch (Exception ex) { throw; } }
public Int32 CreateMetadado(METADADO_CLASSE item) { using (DbContextTransaction transaction = Db.Database.BeginTransaction(IsolationLevel.ReadCommitted)) { try { _metRepository.Add(item); transaction.Commit(); return(0); } catch (Exception ex) { transaction.Rollback(); throw ex; } } }
public Int32 EditMetadado(METADADO_CLASSE item) { using (DbContextTransaction transaction = Db.Database.BeginTransaction(IsolationLevel.ReadCommitted)) { try { METADADO_CLASSE obj = _metRepository.GetById(item.MECL_CD_ID); _metRepository.Detach(obj); _metRepository.Update(item); transaction.Commit(); return(0); } catch (Exception ex) { transaction.Rollback(); throw ex; } } }
public METADADO_CLASSE GetMetadadoById(Int32 id) { METADADO_CLASSE item = _baseService.GetMetadadoById(id); return(item); }