An area is a feature that physically separates your app's content in a logical way. For example, you can have an area for administration and another area for the other stuff. This is particularly useful in big projects. Each area has its own controllers and views, which were discussed in Chapter 3, Routing.
In order to use areas, we need to create an Areas folder in our app at the same level as Controllers and Views. Underneath it, we will create a specific area folder—for example, Admin—and inside that, we need a structure similar to the one we have in the root—that is, with the Controllers and Views folders:
The use of areas in code
Controllers are created in the same way, but we need to add an [Area] attribute:
[Area("Admin")]
public class ManageController : Controller
{
}
It is OK to have multiple controllers with the same name, provided they...