Last active
July 26, 2017 17:14
-
-
Save dcomartin/5ceca7b4689c7621fc362c1fd46eadb2 to your computer and use it in GitHub Desktop.
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
[EnableQuery] | |
public IQueryable<Product> Get() | |
{ | |
return db.Books; | |
} | |
[EnableQuery] | |
public SingleResult<Product> Get([FromODataUri] int key) | |
{ | |
IQueryable<Product> result = db.Books.Where(p => p.Id == key); | |
return SingleResult.Create(result); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment