forked from simplefx/Simple.OData
-
Couldn't load subscription status.
- Fork 202
Retrieving all data from a collection
ejbiker93ss edited this page May 11, 2023
·
28 revisions
var products = await _client
.For("Products")
.FindEntriesAsync();
Assert.NotEmpty(products);var products = await _client
.For<Products>()
.FindEntriesAsync();
Assert.NotEmpty(products);var x = ODataDynamic.Expression;
var products = await _client
.For(x => x.Products)
.FindEntriesAsync();
Assert.NotEmpty(products);Request URI: GET Products
var count = await _client
.For("Products")
.Count()
.FindScalarAsync();
Assert.True(count > 0);var count = await _client
.For<Products>()
.Count()
.FindScalarAsync<int>();
Assert.True(count > 0);var x = ODataDynamic.Expression;
var count = await _client
.For(x => x.Products)
.Count()
.FindScalarAsync();
Assert.True(count > 0);Request URI: GET Products/$count
Promise<int> count;
var products = await _client
.For("Products")
.FindEntriesAsync(true, out count);
Assert.NotEmpty(products);
Assert.True(count > 1);Promise<int> count;
var products = await _client
.For<Products>()
.FindEntriesAsync(true, out count);
Assert.NotEmpty(products);
Assert.True(count > 1);Promise<int> count;
var x = ODataDynamic.Expression;
var products = await _client
.For(x => x.Products)
.FindEntriesAsync(true, out count);
Assert.NotEmpty(products);
Assert.True(count > 1);Request URI: GET Products?$top=1&$inlinecount=allpages
See also:
Retrieving data
can I edit this file?