public function deleteById($collection, $id)
    {
        try {
            $id = new \MongoDB\BSON\ObjectID((string) $id);
        } catch (\Exception $e) {
            return;
        }

        $queryOptions = new QueryOptions();
        $queryOptions->setQueryParams([
            '_id' => $id,
        ]);

        $this->ensureConnection();
        $this->db->$collection->deleteOne($queryOptions->getQueryParams());
    }