Ejemplo n.º 1
0
        private void CreateTombstoneDirtyEntity(object obj, int oid, Transaction transaction)
        {
            DirtyEntity dirtyEntity = new DirtyEntity();

            dirtyEntity.EntityOID  = oid;
            dirtyEntity.EntityType = ReflectionHelper.GetDiscoveringTypeName(obj.GetType());
            dirtyEntity.DirtyOp    = DirtyOperation.Deleted;

            if (transaction != null)
            {
                base.StoreObject(dirtyEntity, transaction);
            }
            else
            {
                base.StoreObject(dirtyEntity);
            }
        }
Ejemplo n.º 2
0
        private async Task CreateDirtyEntityAsync(object obj, DirtyOperation dop, Transaction transaction)
        {
            DirtyEntity dirtyEntity = new DirtyEntity();

            dirtyEntity.EntityOID  = base.GetOID(obj);
            dirtyEntity.DirtyOp    = dop;
            dirtyEntity.EntityType = ReflectionHelper.GetDiscoveringTypeName(obj.GetType());

            if (transaction != null)
            {
                await base.StoreObjectAsync(dirtyEntity, transaction);
            }
            else
            {
                await base.StoreObjectAsync(dirtyEntity);
            }
        }