Skip to content

Instantly share code, notes, and snippets.

@mxmissile
Created March 21, 2012 14:52
Show Gist options
  • Save mxmissile/2147867 to your computer and use it in GitHub Desktop.
Save mxmissile/2147867 to your computer and use it in GitHub Desktop.
public ConfigureFubuMVC()
{
// This line turns on the basic diagnostics and request tracing
IncludeDiagnostics(true);
// All public methods from concrete classes ending in "Controller"
// in this assembly are assumed to be action methods
Actions.IncludeClassesSuffixedWithController();
// Policies
Routes
.IgnoreControllerNamesEntirely()
.IgnoreMethodSuffix("Html")
.RootAtAssemblyNamespace();
// Match views to action methods by matching
// on model type, view name, and namespace
Views.TryToAttachWithDefaultConventions();
Routes.HomeIs<HomeController>(x => x.Index());
this.UseRazor();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment