public IHttpActionResult GetMemberSettings(AuthenticatedRequest request) { var response = new List<MemberSettingsResponse>(); try { var memberId = request.GetMemberId(); var results = MembershipAdapter.GetMemberSettings(memberId); results.ForEach(item => { var itemToAdd = new MemberSettingsResponse { SettingTypeId = (int)item.SettingTypeId, SettingTypeName = item.SettingTypeName, Value = item.Value }; response.Add(itemToAdd); }); } catch (Exception ex) { this.Log<AuthenticatedRequest>(LogCategories.Error, request, ex.Message); } return Ok(response); }
public void GetMemberSettings() { var memberId = this.RequestUserInput<string>("Enter member ID: ", string.Empty); var request = new AuthenticatedRequest { MemberId = memberId }; var response = proxy.GetMemberSettings(request); foreach (var item in response) { Console.WriteLine("{0} - {1} = {2}", item.SettingTypeId, item.SettingTypeName, item.Value); } }