예제 #1
0
		/// <summary>
		/// make request with RemoteProvider
		/// </summary>
		static void Test2()
		{
			var client = new WebHttpClient<IQueryService>(baseAddress);
			IQueryProvider provider = new RemoteProvider(client);
			Query<Customer> query = new Query<Customer>(provider);
			IQueryable<Customer> queryable = from c in ((IQueryable<Customer>)query)
											 where c.ID > 5 && c.ID < 10
											 select c;

			List<Customer> results = queryable.ToList();

		}
예제 #2
0
		public void Test2()
		{
			var client = new WebHttpClient<IQueryService>(baseAddress);
			IQueryProvider provider = new RemoteProvider(client);
			Query<Customer> query = new Query<Customer>(provider);
			
			ThreadPool.QueueUserWorkItem(state => 
				{
					IQueryable<Customer> queryable = from c in new Query<Customer>()
													 where c.ID <= 30
													 && c.Country == "Spain"
													 || c.ContactTitle == "Owner"
													 select c;

					List<Customer> results = queryable.ToList();
					int count = queryable.Count();
				});
			
		}