public void CreateTrain(Train train)
        {
            ICollectionCreator cc     = _cf.CreateCollection();
            MongoTrain         mTrain = new MongoTrain
            {
                Carriages     = train.Carriages,
                StartLocation = train.StartLocation,
                EndLocation   = train.EndLocation,
                TrainId       = train.Id,
                Number        = train.Number
            };

            cc.Trains.InsertOne(mTrain);
        }
        private void DoTestEqualsExact(IGeometry x,
                                       IGeometry somethingExactlyEqual,
                                       IGeometry somethingNotEqualButSameClass,
                                       IGeometry sameClassButEmpty,
                                       IGeometry anotherSameClassButEmpty,
                                       ICollectionFactory collectionFactory)
        {
            IGeometry emptyDifferentClass;

            if (x is Point)
            {
                emptyDifferentClass = geometryFactory.CreateGeometryCollection(null);
            }
            else
            {
                emptyDifferentClass = geometryFactory.CreatePoint((Coordinate)null);
            }

            IGeometry somethingEqualButNotExactly = geometryFactory.CreateGeometryCollection(new IGeometry[] { x });

            DoTestEqualsExact(x, somethingExactlyEqual,
                              collectionFactory.CreateCollection(new IGeometry[] { x }, geometryFactory),
                              somethingNotEqualButSameClass);

            DoTestEqualsExact(sameClassButEmpty, anotherSameClassButEmpty,
                              emptyDifferentClass, x);


            /**
             * Test comparison of non-empty versus empty.
             */
            DoTestEqualsExact(x, somethingExactlyEqual,
                              sameClassButEmpty, sameClassButEmpty);


            DoTestEqualsExact(collectionFactory.CreateCollection(
                                  new IGeometry[] { x, x }, geometryFactory),
                              collectionFactory.CreateCollection(
                                  new IGeometry[] { x, somethingExactlyEqual }, geometryFactory),
                              somethingEqualButNotExactly,
                              collectionFactory.CreateCollection(
                                  new IGeometry[] { x, somethingNotEqualButSameClass }, geometryFactory));
        }