Hello,
If I understand it correctly, it should be possible to create projection, which show values of aggregate root. I have this sample code:
var ContactId = Guid.NewGuid();
var ContactCreated = new ContactEvent(new
{
Id = ContactId,
FirstName = “Peter”,
LastName = “Snobelt”
}, “ContactCreated”);
var ContactUpdated = new ContactEvent(new
{
Id = ContactId,
FirstName = “Petr”,
LastName = “Snobelt”
}, “ContactUpdated”);
using(var connection = new EventStoreConnection(new System.Net.IPEndPoint(ipaddress, 1113))) {
connection.AppendToStream(“Contacts”, -2, new[] { ContactCreated, ContactUpdated });
Console.WriteLine(“Stored”);
}
``
I expect it should be possible to create 2 projections, first which return all contacts (useful for grids) and second which return values per contact (used on details). But I don’t know how to create these projections,especially second projection (I expect it should be available on url which contains ContactId).
Is there any sample of these 2 projections? I try to look at chat sample, but it looks it replay events on client and not on server.
Maybe I just did not understand exactly how to work with projections
Thanks