Example #1
0
        public async Task Post()
        {
            var response = await _client.PostAsync("/sample/Products(1L)/Categories/$ref", Helpers.JSON(new Dictionary <string, object> {
                ["@odata.id"] = "http://localhost/sample/Categories(2)"
            }));

            Assert.Equal(HttpStatusCode.OK, response.StatusCode);

            response = await _client.GetAsync("/sample/Products(1L)/Categories(2)");

            Assert.Equal(HttpStatusCode.OK, response.StatusCode);
        }