Change view & edit route or URL of Entities generated by Drupal Console
You need to edit the entity class's annotation, at e.g. module_name/src/Entity/FooEntity.php.

This is an example of what you need from the Node entity class:

links = {
    "canonical" = "/node/{node}",
    "delete-form" = "/node/{node}/delete",
    "edit-form" = "/node/{node}/edit",
    "version-history" = "/node/{node}/revisions",
    "revision" = "/node/{node}/revisions/{node_revision}/view",
}


You'll probably need to rebuild cache for the changes to be reflected.