public virtual MovementStateDeletedDto ToMovementStateDeletedDto(IMovementStateDeleted e)
        {
            var dto = new MovementStateDeletedDto();

            dto.MovementEventId = e.MovementEventId;
            dto.CreatedAt       = e.CreatedAt;
            dto.CreatedBy       = e.CreatedBy;
            dto.CommandId       = e.CommandId;
            var movementLineEvents = new List <MovementLineStateRemovedDto>();

            foreach (var ee in e.MovementLineEvents)
            {
                MovementLineStateRemovedDto eeDto = MovementLineStateEventDtoConverter.ToMovementLineStateRemovedDto(ee);
                movementLineEvents.Add(eeDto);
            }
            dto.MovementLineEvents = movementLineEvents.ToArray();


            return(dto);
        }
        public virtual MovementStateCreatedDto ToMovementStateCreatedDto(IMovementStateCreated e)
        {
            var dto = new MovementStateCreatedDto();

            dto.MovementEventId        = e.MovementEventId;
            dto.CreatedAt              = e.CreatedAt;
            dto.CreatedBy              = e.CreatedBy;
            dto.CommandId              = e.CommandId;
            dto.DocumentStatusId       = e.DocumentStatusId;
            dto.MovementDate           = e.MovementDate;
            dto.Posted                 = e.Posted;
            dto.Processed              = e.Processed;
            dto.Processing             = e.Processing;
            dto.DateReceived           = e.DateReceived;
            dto.DocumentTypeId         = e.DocumentTypeId;
            dto.IsInTransit            = e.IsInTransit;
            dto.IsApproved             = e.IsApproved;
            dto.ApprovalAmount         = e.ApprovalAmount;
            dto.ShipperId              = e.ShipperId;
            dto.SalesRepresentativeId  = e.SalesRepresentativeId;
            dto.BusinessPartnerId      = e.BusinessPartnerId;
            dto.ChargeAmount           = e.ChargeAmount;
            dto.CreateFrom             = e.CreateFrom;
            dto.FreightAmount          = e.FreightAmount;
            dto.ReversalDocumentNumber = e.ReversalDocumentNumber;
            dto.WarehouseIdFrom        = e.WarehouseIdFrom;
            dto.WarehouseIdTo          = e.WarehouseIdTo;
            dto.Description            = e.Description;
            dto.Active                 = e.Active;
            var movementLineEvents = new List <MovementLineStateCreatedDto>();

            foreach (var ee in e.MovementLineEvents)
            {
                MovementLineStateCreatedDto eeDto = MovementLineStateEventDtoConverter.ToMovementLineStateCreatedDto(ee);
                movementLineEvents.Add(eeDto);
            }
            dto.MovementLineEvents = movementLineEvents.ToArray();

            return(dto);
        }