I have my file structure setup as:
Controllers/Requestor/RequestorHomeController (Namespace: Proj.Presentation.Controllers.Requestor)
Controllers/Approver/ApproverHomeController (Namespace: Proj.Presentation.Controllers.Approver)
My routes look like:
routes.MapRoute(
name: "PrependRequestor",
url: "requestor/{controller}/{action}/{id}",
defaults: new { controller = "RequestorHome", action = "Index", id = UrlParameter.Optional },
namespaces: new string[] { "Proj.Presentation.Controllers.Requestor" }
);
and
routes.MapRoute(
name: "PrependApprover",
url: "approver/{controller}/{action}/{id}",
defaults: new { controller = "ApproverHome", action = "Index", id = UrlParameter.Optional },
namespaces: new string[] { "Proj.Presentation.Controllers.Approver" }
);
I am not receiving any errors, but when I go to Approver/ApproverHomeController/Index
the first route is being hit because the url is requestor/approverhome
. If it is in a different namespace, shouldn't that first controller be ignored? Any suggestions on what I can do to hit the second route?