How To: Remove Northwind & Other Samples From Serene

    Here is how to get rid of them.

    We assume your solution name is MyProject, so you have MyProject.Web project in your solution.

    Perform steps below in Visual Studio:

    • Remove MyProject.Web/Modules/AdminLTE folder. This will remove all server side code related to theme samples.

    • Remove MyProject.Web/Modules/Northwind folder. This will remove all server side code related to Northwind.

    Removing Navigation Items

    Navigation items for these modules are moved under relevant modules folder in v2.5.3. If you are using an older version,

    • Open MyProject.Web/Modules/Common/Navigation/NavigationItems.cs, remove all lines with Northwind, Basic Samples and Theme Samples and remove these two lines:

    Removing Migration Scripts

    Remove “Northwind” from following line in MyProject.Web/App_Start/ SiteInitialization.Migrations.cs:

    Also remove Northwind connection string from web.config.

    • Open MyProject.Web/Content/site/site.less file, remove following lines:
    1. @import "site.basicsamples.less";
    • Remove MyProject.Web/Content/site/site.basicsamples.less file.
    • Remove MyProject.Web/Content/site/site.northwind.less file.

    • Open MyProject.Web/Content/site/rtl.css file, remove sections with Northwind.

    Removing Localization Texts

    • Open MyProject.Web/Modules/Texts.cs and remove following lines:
    • Remove folder MyProject.Web/Scripts/site/texts/samples

    Removing Northwind / Samples Generated Code

    • Expand MyProject.Web/Modules/Common/Imports/ ServerTypings/ServerTypings.tt. Select files starting with Northwind., BasicSamples. and delete them.

    Open DashboardPage.cs, remove these using lines:

    1. using Northwind;

    As Dashboard gets numbers from Northwind tables, you should modify Index() action like this:

    1. <a href="~/Northwind/Order?shippingState=1"></a>

    Building Project and Running T4 (.tt) Templates

    • Now rebuild your solution.

    • Make sure it is built successfully before executing next step.

    • Click Build menu and click Transform All Templates.

    • Rebuild your solution again.

    • Run your project, now Northwind and Sample menus are gone.

    Removing Northwind Tables

    Northwind tables are in a separate database, so you can just drop it.