Search code examples
asp.net-mvcmefnopcommerce

How NopCommerce loads admin area


The question is so simple. How NopCommerce web project (Nop.Web) loads the Admin area while it's separately in another DLL placed in root projects bin dir?

I have worked around AutoFac but seems it's not related to this.


Solution

  • Open Global.asax.cs from Nop.Web and then see Application_Start in method and you can see a line there

    AreaRegistration.RegisterAllAreas();
    

    By this line it registers all area of your domain.

    The RegisterAllAreas method finds all types in the application domain that derive from AreaRegistration and calls each of their RegisterArea methods.

    For more info check this link.