Last active
December 27, 2015 04:09
-
-
Save yngvebn/7265094 to your computer and use it in GitHub Desktop.
Democode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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