Beispiel #1
0
        /// <summary>
        /// Updates an audit log
        /// </summary>
        /// <param name="entity">
        /// The entity.
        /// </param>
        protected override void PersistUpdatedItem(IAuditLog entity)
        {
            ((Entity)entity).UpdatingEntity();

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

            Database.Update(dto);

            entity.ResetDirtyProperties();
        }
Beispiel #2
0
        /// <summary>
        /// The persist new audit log.
        /// </summary>
        /// <param name="entity">
        /// The entity.
        /// </param>
        protected override void PersistNewItem(IAuditLog entity)
        {
            ((Entity)entity).AddingEntity();

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

            Database.Insert(dto);
            entity.Key = dto.Key;

            entity.ResetDirtyProperties();
        }