public virtual AttributeSetInstanceExtensionFieldGroupStateCreatedDto ToAttributeSetInstanceExtensionFieldGroupStateCreatedDto(IAttributeSetInstanceExtensionFieldGroupStateCreated e)
        {
            var dto = new AttributeSetInstanceExtensionFieldGroupStateCreatedDto();

            dto.StateEventId = new AttributeSetInstanceExtensionFieldGroupStateEventIdDtoWrapper(e.StateEventId);
            dto.CreatedAt    = e.CreatedAt;
            dto.CreatedBy    = e.CreatedBy;
            dto.CommandId    = e.CommandId;
            dto.FieldType    = e.FieldType;
            dto.FieldLength  = e.FieldLength;
            dto.FieldCount   = e.FieldCount;
            dto.NameFormat   = e.NameFormat;
            dto.Description  = e.Description;
            dto.Active       = e.Active;
            var attributeSetInstanceExtensionFieldEvents = new List <AttributeSetInstanceExtensionFieldStateCreatedDto>();

            foreach (var ee in e.AttributeSetInstanceExtensionFieldEvents)
            {
                AttributeSetInstanceExtensionFieldStateCreatedDto eeDto = AttributeSetInstanceExtensionFieldStateEventDtoConverter.ToAttributeSetInstanceExtensionFieldStateCreatedDto(ee);
                attributeSetInstanceExtensionFieldEvents.Add(eeDto);
            }
            dto.AttributeSetInstanceExtensionFieldEvents = attributeSetInstanceExtensionFieldEvents.ToArray();

            return(dto);
        }
        public virtual AttributeSetInstanceExtensionFieldGroupStateDeletedDto ToAttributeSetInstanceExtensionFieldGroupStateDeletedDto(IAttributeSetInstanceExtensionFieldGroupStateDeleted e)
        {
            var dto = new AttributeSetInstanceExtensionFieldGroupStateDeletedDto();

            dto.StateEventId = new AttributeSetInstanceExtensionFieldGroupStateEventIdDtoWrapper(e.StateEventId);
            dto.CreatedAt    = e.CreatedAt;
            dto.CreatedBy    = e.CreatedBy;
            dto.CommandId    = e.CommandId;
            var attributeSetInstanceExtensionFieldEvents = new List <AttributeSetInstanceExtensionFieldStateRemovedDto>();

            foreach (var ee in e.AttributeSetInstanceExtensionFieldEvents)
            {
                AttributeSetInstanceExtensionFieldStateRemovedDto eeDto = AttributeSetInstanceExtensionFieldStateEventDtoConverter.ToAttributeSetInstanceExtensionFieldStateRemovedDto(ee);
                attributeSetInstanceExtensionFieldEvents.Add(eeDto);
            }
            dto.AttributeSetInstanceExtensionFieldEvents = attributeSetInstanceExtensionFieldEvents.ToArray();


            return(dto);
        }