Skip to content

Instantly share code, notes, and snippets.

@thunklife
Created January 13, 2013 16:59
Show Gist options
  • Select an option

  • Save thunklife/4525052 to your computer and use it in GitHub Desktop.

Select an option

Save thunklife/4525052 to your computer and use it in GitHub Desktop.
Me failing at getting FubuMVC to run.
using ExquisiteCorpse.Web.Home;
using FubuMVC.Core;
namespace ExquisiteCorpse.Web
{
public class ExquisiteCorpseRegistry : FubuRegistry
{
public ExquisiteCorpseRegistry()
{
Actions
.IncludeClassesSuffixedWithEndpoint();
Routes
.IgnoreControllerNamespaceEntirely()
.IgnoreClassSuffix("EndPoint")
.IgnoreControllerFolderName()
.HomeIs<HomeEndPoint>(point => point.Get(null));
}
}
}
using System;
using FubuMVC.Core;
using FubuMVC.StructureMap;
namespace ExquisiteCorpse.Web
{
public class Global : System.Web.HttpApplication
{
protected void Application_Start(object sender, EventArgs e)
{
FubuApplication
.For<ExquisiteCorpseRegistry>()
.StructureMapObjectFactory()
.Bootstrap();
}
}
}
namespace ExquisiteCorpse.Web.Home
{
public class HomeEndPoint
{
public HomeViewModel Get(HomeInputModel inputModel)
{
return new HomeViewModel {Title = "Hello Der!"};
}
}
public class HomeInputModel
{
}
public class HomeViewModel
{
public string Title { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment