public void UpdateMemberProfileSettings(MemberProfileSettingsUpdateRequest model)
 {
     try
     {
         _baseService.DataProvider.ExecuteNonQuery(_baseService.GetConnection, "dbo.MemberProfile_UpdateProfileSettings", inputParamMapper : delegate(SqlParameterCollection paramCollection)
         {
             paramCollection.AddWithValue("@Id", model.Id);
             paramCollection.AddWithValue("@FirstName", model.FirstName);
             paramCollection.AddWithValue("@MiddleName", model.MiddleName);
             paramCollection.AddWithValue("@LastName", model.LastName);
             paramCollection.AddWithValue("@PhoneNumber", model.PhoneNumber);
             paramCollection.AddWithValue("@Address1", model.Address1);
             paramCollection.AddWithValue("@City", model.City);
             paramCollection.AddWithValue("@StateProvinceId", model.StateProvinceId);
             paramCollection.AddWithValue("@Zip", model.Zip);
             paramCollection.AddWithValue("@DateOfBirth", model.DateOfBirth);
             paramCollection.AddWithValue("@Email", model.Email);
             paramCollection.AddWithValue("@Gender", model.Gender);
             paramCollection.AddWithValue("@Tagline", model.Tagline);
             paramCollection.AddWithValue("@IsGymOwner", model.IsGymOwner);
             paramCollection.AddWithValue("@AlertUsingTextMessage", model.AlertUsingTextMessage);
             paramCollection.AddWithValue("@AlertUsingEmail", model.AlertUsingEmail);
         });
     }
     catch (Exception ex)
     {
         _baseService.LogError(System.Reflection.MethodBase.GetCurrentMethod().Name, ex, "MemberProfileService");
         throw;
     }
 }
        public HttpResponseMessage UpdateProfileSettings(MemberProfileSettingsUpdateRequest model)
        {
            model.Id = _memberProfileService.GetCurrentMemberProfile().Id;
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.NotAcceptable, string.Join(", ", ModelState.Values.SelectMany(x => x.Errors).Select(x => x.ErrorMessage))));
            }
            SuccessResponse response = new SuccessResponse();

            try
            {
                _memberProfileService.UpdateMemberProfileSettings(model);
                return(Request.CreateResponse(HttpStatusCode.OK, response));
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message));
            }
        }