async Task <(bool, SurveyResponseDTO)> SaveRatingResponse() { //validation necessary - will always be in range of values? var cmd = new SurveyResponseRatingResponseCmd(SurveyResponse.SurveyResponseId, Response.Question.QuestionId, RatingAnswer); var response = await SurveyResponseClient.RatingResponse(cmd); if (response.Result == CommandSubmitExecutionResult.Fail) { ValidationMessage = response.Messages.FirstOrDefault(); return(false, null); } return(true, response.EntityQry); }
public async Task <CommandSubmitResult <SurveyResponseDTO> > RatingResponse(SurveyResponseRatingResponseCmd cmd) { string url = $"{_baseUrl}addratingresponse"; return(await PostCmd(cmd, url)); }