views:

60

answers:

3

I can't come up with a nice name for my admin related controllers.

I have a UserController that is used for the site (non-admin related actions). Now I created an ADMIN section that has the following url format:

www.example.com/admin/{controller}/{action}/{id}

My controller folder is layed out like:

/controllers/ /controllers/admin/admincontroller /controllers/usercontroller

I need to make a controller for editing/deleting/listing users to perform admin related actions on them.

I will place this controller in my /controllers/admin/ folder just to keep them seperate.

What should I name this controller?

I don't want to do AdminUserController

As it just looks silly, any help!?

+1  A: 

AdminActionsController?

Is there a reason you don't want them inside your AdminController? All of these actions seem to fall under this category.

EDIT: What about EditController then?

Andrew Song
I don't like actions that have 2 words in them, like www.example.com/admin/edituser/342
mrblah
Why would the actions have to be two words inside your controller? If you didn't have an admin folder, then your default URLs could be /admin/edit/{userId} or something like that.
Andrew Song
+2  A: 

You could put them in an YourProject.Controllers.Admin namespace.

Alternatively if it is just for "url" purposes, you could create specific routes for these controllers, i.e.

routes.MapRoute("/admin/users/{action}/{id}", new { controller = "AdminUser" });
veggerby
A: 

UserManagementController or perhaps ManageUserController or something else along those lines.

www.example.com/admin/UserManagement/{action}/{id} www.example.com/admin/ManageUser/{action}/{id}

Dean Johnston