hello
in the below code i have two areas and am using conventional routing in MVC my my qustion do i always should add the name of the
the area to the pattern as below

hello
in the below code i have two areas and am using conventional routing in MVC my my qustion do i always should add the name of the
the area to the pattern as below

Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Tuhin PaulPosted Oct 18, 2024, 4:57 PM
You don't have to add the area name to the pattern in your conventional routing. it's often a good idea to do so, especially for clarity and consistency. When you look at the route pattern, it's immediately clear which area the route belongs to. This makes it easier to understand and debug your application. If all your routes have the area name in the pattern, it provides a consistent approach, making your code easier to maintain. If you have routes with the same names in different areas, adding the area name to the pattern ensures that there are no naming conflicts.
1. Including Area Name in the Pattern:
Pros: Clearer, consistent, prevents potential conflicts.
Cons: Slightly more verbose.
2. Not Including Area Name in the Pattern:
Pros: Less verbose.
Cons: Less clear about the route's area, potential conflicts if similar routes exist in other areas.
mina shakerPosted Oct 19, 2024, 2:42 PM
@Tuhin Paul but when i did it like below code as you can see the pattern is the same no area spacifaied this where the conflicts come into place correct?