mercredi 27 juillet 2016

Controller action naming consistency in MVC

I'm confused about the action naming consistency in C# ASP.NET-MVC, let's say I have a simple application with following layer :

Controller -> Service layer -> Data Access layer

Data Access Layer contains a 1:1 class with my database table. Let's say I have 5 tables which is User, UserAddresses, Order, OrderDetails, Product

I want to group these into 2 groups so :

CustomerController contains anything related to User and UserAddresses
TransactionController contains anything related to Order, OrderDetails, and Product

My question is usually Action naming method in controller is something like

Index  
Create  
Edit  
Delete  
etc  

So in my case, how do I keep these naming pattern while I need a separate Create, Edit, and Delete page for User and UserAddreses.

Any help will be appreciated

Apologize for bad english

Aucun commentaire:

Enregistrer un commentaire