Esempio n. 1
0
        public async Task <IActionResult> Start()
        {
            var responseId = _clientStorage.Read(SurveyResponse.StorageKey);

            CurrentResponse = await _surveyResponseRepository.Find(responseId);

            if (CurrentResponse == null)
            {
                CurrentResponse = await _surveyResponseRepository.Create();

                _clientStorage.Write(SurveyResponse.StorageKey, CurrentResponse.IdExternal, TimeSpan.FromDays(7));
                await _surveyResponseRepository.SaveChanges();
            }

            return(RedirectToAction("Question1"));
        }