Skip to content

Instantly share code, notes, and snippets.

@yngvebn
Last active December 27, 2015 04:09
Show Gist options
  • Save yngvebn/7265094 to your computer and use it in GitHub Desktop.
Save yngvebn/7265094 to your computer and use it in GitHub Desktop.
Democode
[RoutePrefix("api")]
public class PeopleController : ApiController
{
private readonly DbContext _context;
public PeopleController(DbContext context)
{
_context = context;
}
[Route("people"), HttpGet]
public IQueryable<Person> People()
{
return _context.Set<People>();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment