private async void AddNewRelationOptionSelected(IDialogContext context)
        {
            var editDialog = new EditRelationDialog();

            context.Call(editDialog, ResumeAfterRelationCreated);

            async Task ResumeAfterRelationCreated(IDialogContext ctx, IAwaitable <RelationEditModel> result)
            {
                var relation = await result;

                _relationRepository.AddRelation(relation.EdgeId, relation.FromNodeId, relation.ToNodeId);
                Init();
                await StartAsync(ctx);
            }
        }
        public bool ContainsNodeAfterAddition()
        {
            // arrange
            var allNodes = _nodeRepository.GetAll().ToList();
            var allEdges = _edgeRepository.GetAll().ToList();

            EdgeEntity edge = allEdges.PickRandomElem();

            NodeEntity fromNode = allNodes.PickRandomElem();
            NodeEntity toNode   = allNodes.PickRandomElem();

            // act
            int newRelationId = _relationRepository.AddRelation(edge.Id, fromNode.Id, toNode.Id);
            var allRelations  = _relationRepository.GetAll();

            // assert
            return(allRelations.Any(r =>
                                    r.Id == newRelationId &&
                                    r.EdgeId == edge.Id &&
                                    r.FromNodeId == fromNode.Id &&
                                    r.ToNodeId == toNode.Id));
        }