public List <RestaurantEntity> GetAllRestaurants()
        {
            //Thread.Sleep(2000);
            client.GetAllAsync();
            //Thread.Sleep(2000);
            reseter.WaitOne();

            return(restaurantsModel);
        }
        private void InitializeRestaurantsServiceClient()
        {
            BasicHttpBinding binding = CreateBasicHttp();

            client = new RestaurantWebServiceClient(binding, EndPoint);

            client.CountCompleted += Client_CountCompleted;

            //client.GetRestaurantByIdCompleted += GetRestaurantByIDCompleted;

            client.GetAllCompleted += Client_GetAllRestaurantsCompleted;

            client.GetAllAsync();
        }
 protected void PopulateListView()
 {
     client.GetAllAsync();
     client.GetAllCompleted += ListViewPopulatedCompleted;
 }