Website documentation out of date?

All,

Is the website documentation out of date, or, is the Nuget Package for the .NET Client API not right, or, have I just done something wrong?

**Nuget Package 1.1.0-RC1 **

var connection = EventStore.ClientAPI.EventStoreConnection.Create();

var ipEndpoint = new IPEndPoint(IPAddress.Loopback, 1113);

connection.Connect(ipEndpoint);

var id = new Guid("{B08500AE-8E45-4ec6-9670-6AF45E1D9182}");

connection.CreateStream(“MyStream”, id, false, new byte[] { });

connection.AppendToStream(

“MyStream”,

1,

new EventData(Guid.NewGuid(), “Test2”, false, new byte[] { 1, 2, 3 }, new byte[] { 1, 2, 3 }));

connection.Close();

Website Documentation

EventStore.Configure(Configure.AsDefault());

string stream = "NewStream-" + Guid.NewGuid();

EventStore.CreateStream(stream, new byte[] {1,2,3});

EventStore.AppendToStream(stream, 0, new [] { new TestEvent("Some data") });

Regards,

Ben

I think you can just AppendToStream. I don’t think you need to specifically CreateStream. See https://gist.github.com/jen20/4625709. Where is your code failing? Your Append also may have wrong expected version. You have it set to 1. Note that in the documentation it is 0. Have to scrum right now, but if you check the docs I think you will see that your first event should not be 1.

Phil

Phil,

It isn’t the case it isn’t working, it just doesn’t match the documentation on the website.

You are right about the CreateStream and the expectedVersion, but it was just some sample code I knocked up.

It was interesting I could call CreateStream more than once. I’ll try this out, but does it update the metadata when you call CreateStream a second time?

Regards,

Ben

No it does not update the metadata. This is also changing (metadata will be kept outside). This is a breaking change so we are being very careful with it. There will be an email shortly to the list explaini what we are looking at.