Nettiers.AdventureWorks.Entities.VStoreWithDemographicsBase.GetPropertyValueByName C# (CSharp) Method

GetPropertyValueByName() public static method

Gets the property value by name.
public static GetPropertyValueByName ( VStoreWithDemographics entity, string propertyName ) : object
entity VStoreWithDemographics The entity.
propertyName string Name of the property.
return object
		public static object GetPropertyValueByName(VStoreWithDemographics entity, string propertyName)
		{
			switch (propertyName)
			{
				case "CustomerId":
					return entity.CustomerId;
				case "Name":
					return entity.Name;
				case "ContactType":
					return entity.ContactType;
				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 "Phone":
					return entity.Phone;
				case "EmailAddress":
					return entity.EmailAddress;
				case "EmailPromotion":
					return entity.EmailPromotion;
				case "AddressType":
					return entity.AddressType;
				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 "AnnualSales":
					return entity.AnnualSales;
				case "AnnualRevenue":
					return entity.AnnualRevenue;
				case "BankName":
					return entity.BankName;
				case "BusinessType":
					return entity.BusinessType;
				case "YearOpened":
					return entity.YearOpened;
				case "Specialty":
					return entity.Specialty;
				case "SquareFeet":
					return entity.SquareFeet;
				case "Brands":
					return entity.Brands;
				case "Internet":
					return entity.Internet;
				case "NumberEmployees":
					return entity.NumberEmployees;
			}
			return null;
		}
				

Same methods

VStoreWithDemographicsBase::GetPropertyValueByName ( string propertyName ) : object