I am building ASP.NET MVC3/Razor C# and I need two sides/interface base web aplication, that means I need this:
Admin side, where I will add Clients, and Client side, when client can log in and manage something too. Urls should look like these:
www/Client/ClientId/Controller/Action/Id
www/Admin/Controller/Action/Id
And I want something like this: controllers which belongs to Admin have in direcotry Controllers/Admin, and controllers which belongs to client have in directory Controllers/Client. The same with Views: Views/Admin, Views/Client. Problem is when I have url www/Client/Project and www/Admin/Project, and both are taking the same controller, which is not what I want.
So please help me to solve this, design best structure. Thank you
You can organise your site into separate sections using areas:
http://msdn.microsoft.com/en-us/library/ee671793.aspx
If they are completely separate then it’s probably cleaner just to create them as separate MVC applications, with common code in a business layer. However using areas will let you link between the two sections easier (for example, if you wanted to display “edit” links next to data in the client section).