public void Dispose()
        {
            foreach (var entity in apiClient.Entities.ToList())
            {
                apiClient.Detach(entity.Entity);
            }

            foreach (var link in apiClient.Links.ToList())
            {
                apiClient.DetachLink(link.Source, link.SourceProperty, link.Target);
            }
        }