public static EntityDetailsResponse FromEntityId(Guid EntityInstanceId) { var ret = new EntityDetailsResponse(); var ItemRequest = new GetRequest <InstanceIdParameters>(); ItemRequest.Key = new InstanceIdParameters(); ItemRequest.Key.InstanceId = EntityInstanceId; var ChildItemRequest = new GetRequest <EntityIdParameters>(); ChildItemRequest.Key = new EntityIdParameters(); ChildItemRequest.Key.EntityId = EntityInstanceId; var ChildListRequest = new ListRequest <EntityIdParameters>(); ChildListRequest.Key = new EntityIdParameters(); ChildListRequest.Key.EntityId = EntityInstanceId; ret.Entity = new EntityApiController().GetWebMethod(ItemRequest); //These items are in the order in which they appear in the Solution Explorer. ret.BeltSize = new EntityBeltSizeApiController().GetWebMethod(ChildItemRequest); ret.BraSize = new EntityBraSizeApiController().GetWebMethod(ChildItemRequest); ret.DressSize = new DressSizeApiController().GetWebMethod(ChildItemRequest); ret.HeadSize = new EntityHeadSizeApiController().GetWebMethod(ChildItemRequest); ret.PantSize = new EntityPantSizeApiController().GetWebMethod(ChildItemRequest); ret.ShirtSize = new EntityShirtSizeApiController().GetWebMethod(ChildItemRequest); ret.ShoeSize = new EntityShoeSizeApiController().GetWebMethod(ChildItemRequest); ret.UnderwearSize = new EntityUnderwearSizeApiController().GetWebMethod(ChildItemRequest); ret.Address = new EntityAddressApiController().ListWebMethod(ChildListRequest); ret.Email = new EntityEmailAddressApiController().ListWebMethod(ChildListRequest); ret.PhoneNumber = new EntityPhoneNumberApiController().ListWebMethod(ChildListRequest); ret.Certification = new EntityCertificationApiController().ListWebMethod(ChildListRequest); ret.Degree = new EntityDegreeApiController().ListWebMethod(ChildListRequest); ret.School = new EntitySchoolApiController().ListWebMethod(ChildListRequest); ret.EducationLevel = new EntityEducationLevelApiController().GetWebMethod(ChildItemRequest); ret.BankAccount = new EntityBankAccountApiController().ListWebMethod(ChildListRequest); ret.DateOfBirth = new EntityDateOfBirthApiController().GetWebMethod(ChildItemRequest); ret.Ethnicity = new EntityEthnicityApiController().GetWebMethod(ChildItemRequest); ret.EyeColor = new EntityEyeColorApiController().GetWebMethod(ChildItemRequest); ret.GovernmentIdentification = new EntityGovernmentIdentificationApiController().ListWebMethod(ChildListRequest); ret.HairColor = new EntityHairColorApiController().GetWebMethod(ChildItemRequest); ret.Height = new EntityHeightApiController().GetWebMethod(ChildItemRequest); ret.Weight = new EntityWeightApiController().GetWebMethod(ChildItemRequest); ret.Like = new EntityLikeApiController().ListWebMethod(ChildListRequest); ret.Allergy = new EntityAllergyApiController().ListWebMethod(ChildListRequest); ret.BloodType = new EntityBloodTypeApiController().GetWebMethod(ChildItemRequest); ret.Condition = new EntityConditionApiController().ListWebMethod(ChildListRequest); ret.EmergencyContact = new EntityEmergencyContactApiController().ListWebMethod(ChildListRequest); ret.Immunization = new EntityImmunizationApiController().ListWebMethod(ChildListRequest); ret.Incident = new EntityIncidentApiController().ListWebMethod(ChildListRequest); ret.Insurance = new EntityInsuranceApiController().ListWebMethod(ChildListRequest); ret.Medication = new EntityMedicationApiController().ListWebMethod(ChildListRequest); ret.Procedure = new EntityProcedureApiController().ListWebMethod(ChildListRequest); ret.Sex = new EntitySexApiController().GetWebMethod(ChildItemRequest); ret.AngerLanguage = new EntityAngerLanguageApiController().GetWebMethod(ChildItemRequest); ret.BriggsMyers = new EntityBriggsMyersApiController().GetWebMethod(ChildItemRequest); ret.LoveLanguage = new EntityLoveLanguageApiController().GetWebMethod(ChildItemRequest); ret.PoliticalAffiliation = new EntityPoliticalAffiliationApiController().GetWebMethod(ChildItemRequest); ret.Religion = new EntityReligionApiController().GetWebMethod(ChildItemRequest); ret.ReligiousFrequency = new EntityReligiousFrequencyApiController().GetWebMethod(ChildItemRequest); ret.SexualOrientation = new EntitySexualOrientationApiController().GetWebMethod(ChildItemRequest); return(ret); }