/// <summary>
        /// Persists an updated shipment status.
        /// </summary>
        /// <param name="entity">
        /// The entity.
        /// </param>
        protected override void PersistUpdatedItem(IShipmentStatus entity)
        {
            ((Entity)entity).UpdatingEntity();

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

            Database.Update(dto);

            entity.ResetDirtyProperties();
        }
        /// <summary>
        /// Persists a new shipment status.
        /// </summary>
        /// <param name="entity">
        /// The shipment status.
        /// </param>
        protected override void PersistNewItem(IShipmentStatus entity)
        {
            ((Entity)entity).AddingEntity();

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

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