public virtual ActionResult SaveAnswerBulk(Guid surveyId, List <SurveyProfileAnswerModel> answers) { SurveyProfileModel model = new SurveyProfileModel() { SelectedAnswers = answers, SurveyId = surveyId //ProductId = productId }; if (_sessionContext.CurrentUser != null && _sessionContext.CurrentUser.UserId != null) { model.UserId = _sessionContext.CurrentUser.UserId; } if (model.UserId == null || model.UserId == Guid.Empty) { model.VisitorId = Guid.NewGuid(); } //var apiResult = _surveyApi.SaveAnswers(model); var responseModel = GetLinkedProducts(surveyId, answers); return(JsonSuccess(responseModel, JsonRequestBehavior.AllowGet)); }
public ResponseModel <BoolResponse> SaveAnswers(SurveyProfileModel surveyProfile) { return(CallApi <BoolResponse>(string.Format(ApiUrls.SurveySaveAllAnswers), JsonConvert.SerializeObject(surveyProfile), Method.POST)); }