Esempio n. 1
0
        protected override void PersistUpdatedItem(IMigrationEntry entity)
        {
            ((MigrationEntry)entity).UpdatingEntity();

            var factory = new MigrationEntryFactory();
            var dto     = factory.BuildDto(entity);

            Database.Update(dto);

            entity.ResetDirtyProperties();
        }
Esempio n. 2
0
        protected override void PersistNewItem(IMigrationEntry entity)
        {
            ((MigrationEntry)entity).AddingEntity();

            var factory = new MigrationEntryFactory();
            var dto     = factory.BuildDto(entity);

            var id = Convert.ToInt32(Database.Insert(dto));

            entity.Id = id;

            entity.ResetDirtyProperties();
        }