ASP.NET MVC DRY
I have a project which has Area called Admin. There is a class called MenuTab with code logic which is used in Admin Area Master page and on the root Master page. Now I want admin Area to fully decoupled and not rely on root pages/code.
Should I create MenuTab class for Admin Area and another for root pages so that when I remove Admin area from project to use it somewhere else work smo开发者_C百科othly OR keep MenuTab class at the root level and use it everywhere. What approach should I use?
Hope you understand my question.
How can I make Admin area independent?
Create a common assembly which all of your other web projects inherit from.
This is pretty common practice.
精彩评论