Skip to content

Instantly share code, notes, and snippets.

@beyond-code-github
Last active December 23, 2015 16:29
Show Gist options
  • Select an option

  • Save beyond-code-github/6661930 to your computer and use it in GitHub Desktop.

Select an option

Save beyond-code-github/6661930 to your computer and use it in GitHub Desktop.
Post handler binding to a product model
this.Post["Products"] = _ =>
{
var product = _.Bind<Product>();
_.StatusCode = 201;
return new { Message = string.Format("Received product {0}", product.Name) };
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment