private async Task OnUpdatePeopleReceived(UpdatePeople msg) { Console.WriteLine("message update: " + msg.PartialDoc.Id + " received"); if (!string.IsNullOrEmpty(msg?.PartialDoc?.Id)) { await _peopleIndexer.UpdateDocument(msg.PartialDoc, msg.PartialDoc.Id); } }
private static void UpdateOne(IBus bus, string id) { var partial = new UpdatePeople { PartialDoc = new PartialPeople { Id = id, Adress = new Adress { City = "City" + id, Street = "Street" + id, Country = "Country" + id, PostalCode = "PostalCode" + id } } }; bus.Publish(partial); }