Skip to content

Instantly share code, notes, and snippets.

@guntidheerajkumar
Created November 12, 2015 10:57
Show Gist options
  • Save guntidheerajkumar/ef53e20fd9f7f1d7115a to your computer and use it in GitHub Desktop.
Save guntidheerajkumar/ef53e20fd9f7f1d7115a to your computer and use it in GitHub Desktop.
public class MyCustomEngine : RazorViewEngine
{
public MyCustomEngine()
{
base.AreaViewLocationFormats = new string[] { "~/Areas/{2}/Views/{1}/{0}.cshtml", "~/Areas/{2}/Views/Shared/{0}.cshtml" };
base.AreaMasterLocationFormats = new string[] { "~/Areas/{2}/Views/{1}/{0}.cshtml", "~/Areas/{2}/Views/Shared/{0}.cshtml" };
base.AreaPartialViewLocationFormats = new string[] { "~/Areas/{2}/Views/{1}/{0}.cshtml", "~/Areas/{2}/Views/Shared/{0}.cshtml" };
base.ViewLocationFormats = new string[] { "~/Views/{1}/{0}.cshtml", "~/Views/Shared/{0}.cshtml" };
base.MasterLocationFormats = new string[] { "~/Views/{1}/{0}.cshtml", "~/Views/Shared/{0}.cshtml" };
base.PartialViewLocationFormats = new string[] { "~/Views/{1}/{0}.cshtml", "~/Views/Shared/{0}.cshtml" };
base.FileExtensions = new string[] { "cshtml" };
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment