Skip to content

Instantly share code, notes, and snippets.

@ryanlowdermilk
Created January 17, 2012 02:07
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 ryanlowdermilk/1624106 to your computer and use it in GitHub Desktop.
Save ryanlowdermilk/1624106 to your computer and use it in GitHub Desktop.
Get["/idea/{id}"] = parameters =>
{
using (var db = new IdeastrikeContext())
{
int id = parameters.id;
var idea = db.Ideas.Where(i => i.Id == id).FirstOrDefault();
return string.Format("Id: {0}, Title: {1} Description: {2}", idea.Id, idea.Title, idea.Description);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment