-
Notifications
You must be signed in to change notification settings - Fork 220
Retrieving all data from a collection
object edited this page Oct 9, 2012
·
15 revisions
Simple.Data method All is used to retrieve all data from a collection.
IEnumerable<dynamic> products = _db.Products.All(); Assert.NotEmpty(products);
Request URI: GET Products
IEnumerable<dynamic> orderDetails = _db.Order_Details.All(); Assert.NotEmpty(orderDetails);
Request URI: GET OrderDetails
var count = _db.Products.All().Count(); Assert.True(count > 0);
Request URI: GET Products/$count
Promise<int> count; IEnumerable<dynamic> products = _db.Products.All().WithTotalCount(out count).Take(1); Assert.NotEmpty(products); Assert.True(count > 1);
Request URI: GET Products?$top=1&$inlinecount=allpages