Manual index (link to ) streams

Hi,

Is it is possible to “link to” manually in the c# client API?

By that I mean can I write existing events by reference one by one into another stream, as opposed to writing the actual event data to a stream. I realize that this can be done by projection but I have a requirement to do it by hand.

Yes if you look at a linkTo event it just follows a structure. You can do it from outside of eventstore.

Thanks Greg, you wouldn’t happen to have an example of how to do that through the c# api would you. Or an example of the structure to post? I tried looking in an existing linkto stream through post man but it just brings back the full linked event body

its $> as type ####@stream if I remember correctly

https://github.com/EventStore/EventStore/blob/daddeca886f43e40489efd7d9f45cb6ddd4aed8a/src/EventStore.ClientAPI/Common/SystemNames.cs#L115

its $linkTo as type ####@stream if I remember correctly but double check

https://github.com/EventStore/EventStore/blob/daddeca886f43e40489efd7d9f45cb6ddd4aed8a/src/EventStore.ClientAPI/Common/SystemNames.cs

Sorry wrong link https://github.com/EventStore/EventStore/blob/daddeca886f43e40489efd7d9f45cb6ddd4aed8a/src/EventStore.ClientAPI/Common/SystemNames.cs#L115

Ok, if I create an event with type “$>” then what goes in the body?

####@stream IIRC