コード例 #1
0
        public void SupportsODataInLinq()
        {
            var client = new HttpClient() { BaseAddress = ApiConfig.ApiBaseAddress };

            var persons = client.CreateQuery<Person>().Where(p => p.FirstName == "John").OrderBy(p => p.Id).Skip(1).Take(1).ToList();

            Assert.IsNotNull(persons);
            Assert.IsTrue(persons.Count == 1);
            Assert.IsTrue(persons[0].Id == 2);
        }