示例#1
0
        public ODataClient(ODataBatch batch)
        {
            _urlBase = batch.RequestBuilder.UrlBase;
            _schema = Client.Schema.Get(_urlBase);

            _requestBuilder = batch.RequestBuilder;
            _requestRunner = batch.RequestRunner;
        }
        public ODataClient(ODataBatch batch)
        {
            _settings = batch.Settings;
            _schema = Client.Schema.Get(_settings.UrlBase, _settings.Credentials);

            _requestBuilder = batch.RequestBuilder;
            _requestRunner = batch.RequestRunner;
        }
示例#3
0
        public ODataClient(ODataBatch batch)
        {
            _urlBase = batch.RequestBuilder.UrlBase;
            _schema  = Client.Schema.Get(_urlBase);

            _requestBuilder = batch.RequestBuilder;
            _requestRunner  = batch.RequestRunner;
        }
        public async Task Get_the_most_expensive_product_untyped_batch()
        {
            object result = 0;
            var batch = new ODataBatch(_client);
            batch += async c => result = await c
                .FindScalarAsync("Products/Default.MostExpensive()");
            await batch.ExecuteAsync();

            Assert.InRange((double)result, 500, 1000);
        }
 public ODataAdapterTransaction(ODataTableAdapter adapter)
 {
     _adapter = adapter;
     _batch = new ODataBatch(_adapter.UrlBase);
 }
        public async Task CreateMovie_batch()
        {
            Movie result = null;
            var batch = new ODataBatch(_client);
            batch += async c => result = await c
                .Unbound<Movie>()
                .Action("CreateMovie")
                .Set(new { Title = Guid.NewGuid().ToString() })
                .ExecuteAsSingleAsync();
            await batch.ExecuteAsync();

            Assert.True(result.ID > 0);
        }
 public ODataAdapterTransaction(ODataTableAdapter adapter)
 {
     _adapter = adapter;
     _batch = new ODataBatch(_adapter.ClientSettings);
 }