void deleteButton_Click(object sender, EventArgs e)
 {
     TodoItemDeleted @event = new TodoItemDeleted(todoItem.id);
     state.LoadAndPersist(@event);
 }
 public IEvent transformEvent(TodoItemDeleted toTransform, IEvent transformAgainst)
 {
     if (transformAgainst.GetType().Equals(typeof(TodoItemCreated)))
     {
         //Delete an item that has been created server side, impossible through UI, how to know id of item to delete?
     }
     else if (transformAgainst.GetType().Equals(typeof(TodoItemDeleted)))
     {
         if (toTransform.aggregateId == ((TodoItemDeleted)transformAgainst).aggregateId)
             //Delete todo item when other side has also deleted it. No problem, remove this event.
             return new Unused();
     }
     else if (transformAgainst.GetType().Equals(typeof(TodoItemsDeleted)))
     {
         //If the item deleted is deleted by multiple on the server, remove this event
         if (((TodoItemsDeleted)transformAgainst).aggregateIds.Contains(toTransform.aggregateId))
             return new Unused();
     }
     else if (transformAgainst.GetType().Equals(typeof(TodoItemIndexChanged)))
     {
         // No problem
     }
     return toTransform;
 }