Try our conversational search powered by Generative AI!

Controllers in a separate project?

Vote:
 

Hi,

Iam trying to separate the controllers into a separate project. How do i modify the routing to handle this. 

I know in MVC you can add a namespace parameter to the routing, is that possible with EPiServers MapContentRoute?

Any ideas?

Thanks

#203367
Apr 18, 2019 10:50
Vote:
 

Hi Uyen

I don't think you need to specify a namespace constraint for the routes in this case. If you move the controllers to another assembly, and they are all available for the web project, everything should be fine.

The namespace constraint is more useful when you have more than one controller with the same name, but in different namespaces. In that case you can use this constraint to define different routes with different controllers.

#203372
Apr 18, 2019 11:45
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.