Ejemplo n.º 1
0
        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()));
        }
Ejemplo n.º 2
0
        /// <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));
        }
Ejemplo n.º 3
0
 private Historico GetInsertHistorico(DbEntityEntry entry)
 {
     return(HistoricoVO.CreateInsertHistorico(entry.Entity));
 }