jbogard / ContosoUniversityCore

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How do you specify the View file locations for the Feature folders?

jhoiby opened this issue · comments

I really like the "features" organization structure you use -- it fixes the annoying folder structure convention used by .Net MVC. However, when I try to duplicate the structure I of course get a "The view 'Index' was not found. The following locations were searched... (the usual paths)" exception.

How do you overcome specify the new View locations? I searched the ContosoUniversityCore project file-by-file but I don't see where you declare the new location for views. What am I missing?

Thank you! I've been self-updating my programming skills from 1998-era PHP to modern CQRS+DDD and you, Udi Dahan and select others have made the journey easy and enjoyable. Your blog and examples literally change lives.

Never fails... I'll spend hours looking for a solution, and then give up and ask for help. Then the process of writing the question triggers something in my mind and I find the answer in minutes.

I finally thought to check the references and the solution of course was to install the NuGet package "OdeToCode.AddFeatureFolders" and add it to MVC in startup.cs:

services.AddMvc()
    .AddFeatureFolders();

Thank you for your indirect help!