private Historico GetUpdateHistorico(DbEntityEntry entry) { object originalValue = null; //if (entry.OriginalValues != null) // originalValue = entry.OriginalValues.ToObject(); //else // originalValue = entry.GetDatabaseValues().ToObject(); return(HistoricoVO.CreateUpdateHistorico(entry.OriginalValues.ToObject(), entry.CurrentValues.ToObject())); }
/// <summary> /// Cria os registros de Historico. /// </summary> //private Historico GetHistorico(DbEntityEntry entry) //{ // Historico returnValue = null; // if (entry.State == EntityState.Added) // { // returnValue = GetInsertHistorico(entry); // } // else if (entry.State == EntityState.Modified) // { // returnValue = GetUpdateHistorico(entry); // } // else if (entry.State == EntityState.Deleted) // { // returnValue = GetDeleteHistorico(entry); // } // return returnValue; //} //private Historico GetInsertHistorico(DbEntityEntry entry) //{ // //return HistoricoVO.CreateInsertHistorico(entry.Entity); //} private Historico GetDeleteHistorico(DbEntityEntry entry) { return(HistoricoVO.CreateDeleteHistorico(entry.Entity)); }
private Historico GetInsertHistorico(DbEntityEntry entry) { return(HistoricoVO.CreateInsertHistorico(entry.Entity)); }