Skip to content

Instantly share code, notes, and snippets.

@iarovyi
Created March 9, 2016 15:44
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 iarovyi/39a2bd4ab78cd2097063 to your computer and use it in GitHub Desktop.
Save iarovyi/39a2bd4ab78cd2097063 to your computer and use it in GitHub Desktop.
[RoutePrefix("stations")]
public class RailwayStationsController : ApiController
{
[HttpGet]
[Route]
[EnableQuery]
public IQueryable<RailwayStationModel> GetAll()
{
return testData.AsQueryable();
}
RailwayStationModel[] testData = /*initialization here*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment