-
-
Save peter3/69abf1cb0ebbb2a8b392065fe0202500 to your computer and use it in GitHub Desktop.
Revisions
-
peter3 revised this gist
Jun 28, 2019 . 1 changed file with 12 additions and 23 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,26 +1,15 @@ public class FeatureViewLocationRazorViewEngine : RazorViewEngine { public FeatureViewLocationRazorViewEngine() { var featureFolderViewLocationFormats = new[] { "~/Features/{1}/{0}.cshtml", "~/Features/Shared/Views/{0}.cshtml" }; ViewLocationFormats = featureFolderViewLocationFormats; MasterLocationFormats = featureFolderViewLocationFormats; PartialViewLocationFormats = featureFolderViewLocationFormats; } } /* in global.asax */ ViewEngines.Engines.Clear(); ViewEngines.Engines.Add(new FeatureViewLocationRazorViewEngine()); -
jbogard created this gist
Oct 3, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ public class FeatureViewLocationRazorViewEngine : RazorViewEngine { public FeatureViewLocationRazorViewEngine() { ViewLocationFormats = new[] { "~/Features/{1}/{0}.cshtml", "~/Features/{1}/{0}.vbhtml", "~/Features/Shared/{0}.cshtml", "~/Features/Shared/{0}.vbhtml", }; MasterLocationFormats = ViewLocationFormats; PartialViewLocationFormats = new[] { "~/Features/{1}/{0}.cshtml", "~/Features/{1}/{0}.vbhtml", "~/Features/Shared/{0}.cshtml", "~/Features/Shared/{0}.vbhtml", }; } } /* in global.asax */ ViewEngines.Engines.Clear(); ViewEngines.Engines.Add(new FeatureViewLocationRazorViewEngine());