Skip to content

Instantly share code, notes, and snippets.

@beyond-code-github
Last active December 23, 2015 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beyond-code-github/6661930 to your computer and use it in GitHub Desktop.
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