using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace WCF_DataServiceExample
{
	public class ViewModel : INotifyPropertyChanged
	{
		#region INotifyPropertyChanged Members

		public event PropertyChangedEventHandler PropertyChanged;

		private void OnPropertyChanged(string propertyName)
		{
			if (this.PropertyChanged != null)
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
		}

		#endregion

		private string queryName;
		public string QueryName
		{
			get
			{
				return this.queryName;
			}
			set
			{
				if (this.queryName != value)
				{
					this.queryName = value;
					this.OnPropertyChanged("QueryName");
				}
			}
		}

		private List<string> queryNames;
		public List<string> QueryNames
		{
			get
			{
				if (this.queryNames == null)
				{
					this.queryNames = new List<string>()
										{
											"Customers", "Employees", "Orders", "Products"
										};
				}

				return this.queryNames;
			}
		}
	}
}
