Inheritance: VSalesPersonBase
		///<summary>
		///  Returns a Typed VSalesPersonBase Entity 
		///</summary>
		public virtual VSalesPersonBase Copy()
		{
			//shallow copy entity
			VSalesPerson copy = new VSalesPerson();
				copy.SalesPersonId = this.SalesPersonId;
				copy.Title = this.Title;
				copy.FirstName = this.FirstName;
				copy.MiddleName = this.MiddleName;
				copy.LastName = this.LastName;
				copy.Suffix = this.Suffix;
				copy.JobTitle = this.JobTitle;
				copy.Phone = this.Phone;
				copy.EmailAddress = this.EmailAddress;
				copy.EmailPromotion = this.EmailPromotion;
				copy.AddressLine1 = this.AddressLine1;
				copy.AddressLine2 = this.AddressLine2;
				copy.City = this.City;
				copy.StateProvinceName = this.StateProvinceName;
				copy.PostalCode = this.PostalCode;
				copy.CountryRegionName = this.CountryRegionName;
				copy.TerritoryName = this.TerritoryName;
				copy.TerritoryGroup = this.TerritoryGroup;
				copy.SalesQuota = this.SalesQuota;
				copy.SalesYtd = this.SalesYtd;
				copy.SalesLastYear = this.SalesLastYear;
			copy.AcceptChanges();
			return (VSalesPerson)copy;
		}
		///<summary>
		/// A simple factory method to create a new <see cref="VSalesPerson"/> instance.
		///</summary>
		///<param name="_salesPersonId"></param>
		///<param name="_title"></param>
		///<param name="_firstName"></param>
		///<param name="_middleName"></param>
		///<param name="_lastName"></param>
		///<param name="_suffix"></param>
		///<param name="_jobTitle"></param>
		///<param name="_phone"></param>
		///<param name="_emailAddress"></param>
		///<param name="_emailPromotion"></param>
		///<param name="_addressLine1"></param>
		///<param name="_addressLine2"></param>
		///<param name="_city"></param>
		///<param name="_stateProvinceName"></param>
		///<param name="_postalCode"></param>
		///<param name="_countryRegionName"></param>
		///<param name="_territoryName"></param>
		///<param name="_territoryGroup"></param>
		///<param name="_salesQuota"></param>
		///<param name="_salesYtd"></param>
		///<param name="_salesLastYear"></param>
		public static VSalesPerson CreateVSalesPerson(System.Int32 _salesPersonId, System.String _title, System.String _firstName, System.String _middleName, System.String _lastName, System.String _suffix, System.String _jobTitle, System.String _phone, System.String _emailAddress, System.Int32 _emailPromotion, System.String _addressLine1, System.String _addressLine2, System.String _city, System.String _stateProvinceName, System.String _postalCode, System.String _countryRegionName, System.String _territoryName, System.String _territoryGroup, System.Decimal? _salesQuota, System.Decimal _salesYtd, System.Decimal _salesLastYear)
		{
			VSalesPerson newVSalesPerson = new VSalesPerson();
			newVSalesPerson.SalesPersonId = _salesPersonId;
			newVSalesPerson.Title = _title;
			newVSalesPerson.FirstName = _firstName;
			newVSalesPerson.MiddleName = _middleName;
			newVSalesPerson.LastName = _lastName;
			newVSalesPerson.Suffix = _suffix;
			newVSalesPerson.JobTitle = _jobTitle;
			newVSalesPerson.Phone = _phone;
			newVSalesPerson.EmailAddress = _emailAddress;
			newVSalesPerson.EmailPromotion = _emailPromotion;
			newVSalesPerson.AddressLine1 = _addressLine1;
			newVSalesPerson.AddressLine2 = _addressLine2;
			newVSalesPerson.City = _city;
			newVSalesPerson.StateProvinceName = _stateProvinceName;
			newVSalesPerson.PostalCode = _postalCode;
			newVSalesPerson.CountryRegionName = _countryRegionName;
			newVSalesPerson.TerritoryName = _territoryName;
			newVSalesPerson.TerritoryGroup = _territoryGroup;
			newVSalesPerson.SalesQuota = _salesQuota;
			newVSalesPerson.SalesYtd = _salesYtd;
			newVSalesPerson.SalesLastYear = _salesLastYear;
			return newVSalesPerson;
		}
		/// <summary>
		/// Gets the property value by name.
		/// </summary>
		/// <param name="entity">The entity.</param>
		/// <param name="propertyName">Name of the property.</param>
		/// <returns></returns>
		public static object GetPropertyValueByName(VSalesPerson entity, string propertyName)
		{
			switch (propertyName)
			{
				case "SalesPersonId":
					return entity.SalesPersonId;
				case "Title":
					return entity.Title;
				case "FirstName":
					return entity.FirstName;
				case "MiddleName":
					return entity.MiddleName;
				case "LastName":
					return entity.LastName;
				case "Suffix":
					return entity.Suffix;
				case "JobTitle":
					return entity.JobTitle;
				case "Phone":
					return entity.Phone;
				case "EmailAddress":
					return entity.EmailAddress;
				case "EmailPromotion":
					return entity.EmailPromotion;
				case "AddressLine1":
					return entity.AddressLine1;
				case "AddressLine2":
					return entity.AddressLine2;
				case "City":
					return entity.City;
				case "StateProvinceName":
					return entity.StateProvinceName;
				case "PostalCode":
					return entity.PostalCode;
				case "CountryRegionName":
					return entity.CountryRegionName;
				case "TerritoryName":
					return entity.TerritoryName;
				case "TerritoryGroup":
					return entity.TerritoryGroup;
				case "SalesQuota":
					return entity.SalesQuota;
				case "SalesYtd":
					return entity.SalesYtd;
				case "SalesLastYear":
					return entity.SalesLastYear;
			}
			return null;
		}
		/// <summary>
		/// Convert a nettiers collection to the ws proxy collection.
		/// </summary>
		public static VSalesPerson Convert(WsProxy.VSalesPerson item)
		{			
			VSalesPerson outItem = new VSalesPerson();			
			outItem.SalesPersonId = item.SalesPersonId;
			outItem.Title = item.Title;
			outItem.FirstName = item.FirstName;
			outItem.MiddleName = item.MiddleName;
			outItem.LastName = item.LastName;
			outItem.Suffix = item.Suffix;
			outItem.JobTitle = item.JobTitle;
			outItem.Phone = item.Phone;
			outItem.EmailAddress = item.EmailAddress;
			outItem.EmailPromotion = item.EmailPromotion;
			outItem.AddressLine1 = item.AddressLine1;
			outItem.AddressLine2 = item.AddressLine2;
			outItem.City = item.City;
			outItem.StateProvinceName = item.StateProvinceName;
			outItem.PostalCode = item.PostalCode;
			outItem.CountryRegionName = item.CountryRegionName;
			outItem.TerritoryName = item.TerritoryName;
			outItem.TerritoryGroup = item.TerritoryGroup;
			outItem.SalesQuota = item.SalesQuota;
			outItem.SalesYtd = item.SalesYtd;
			outItem.SalesLastYear = item.SalesLastYear;
							
			outItem.AcceptChanges();			
			return outItem;
		}
		/// <summary>
		/// Deserialize the mock VSalesPerson entity from a temporary file.
		/// </summary>
		private void Step_7_DeserializeEntity_Generated()
		{
			string fileName = "temp_VSalesPerson.xml";
		
			XmlSerializer mySerializer = new XmlSerializer(typeof(VSalesPerson)); 
			System.IO.FileStream myFileStream = new System.IO.FileStream(fileName,  System.IO.FileMode.Open); 
			mock = (VSalesPerson) mySerializer.Deserialize(myFileStream);
			myFileStream.Close();
			System.IO.File.Delete(fileName);
			
			System.Console.WriteLine("mock correctly deserialized from a temporary file.");
		}
		///<summary>
		///  Returns a Typed VSalesPerson Entity with mock values.
		///</summary>
		static public VSalesPerson CreateMockInstance()
		{		
			VSalesPerson mock = new VSalesPerson();
						
			mock.SalesPersonId = TestUtility.Instance.RandomNumber();
			mock.Title = TestUtility.Instance.RandomString(8, false);;
			mock.FirstName = TestUtility.Instance.RandomString(24, false);;
			mock.MiddleName = TestUtility.Instance.RandomString(24, false);;
			mock.LastName = TestUtility.Instance.RandomString(24, false);;
			mock.Suffix = TestUtility.Instance.RandomString(10, false);;
			mock.JobTitle = TestUtility.Instance.RandomString(24, false);;
			mock.Phone = TestUtility.Instance.RandomString(11, false);;
			mock.EmailAddress = TestUtility.Instance.RandomString(24, false);;
			mock.EmailPromotion = TestUtility.Instance.RandomNumber();
			mock.AddressLine1 = TestUtility.Instance.RandomString(29, false);;
			mock.AddressLine2 = TestUtility.Instance.RandomString(29, false);;
			mock.City = TestUtility.Instance.RandomString(14, false);;
			mock.StateProvinceName = TestUtility.Instance.RandomString(24, false);;
			mock.PostalCode = TestUtility.Instance.RandomString(6, false);;
			mock.CountryRegionName = TestUtility.Instance.RandomString(24, false);;
			mock.TerritoryName = TestUtility.Instance.RandomString(24, false);;
			mock.TerritoryGroup = TestUtility.Instance.RandomString(24, false);;
			mock.SalesQuota = TestUtility.Instance.RandomShort();
			mock.SalesYtd = TestUtility.Instance.RandomShort();
			mock.SalesLastYear = TestUtility.Instance.RandomShort();
		   return (VSalesPerson)mock;
		}