public ActionResult stepThree() { if (HttpContext.Session.GetInt32("articleId") != null) { int id = (int)HttpContext.Session.GetInt32("articleId"); TempArticle tempArticle = dbContext.tempArticles.SingleOrDefault(ta => ta.Id == id); StepThreeViewModel model = _mapper.Map <TempArticle, StepThreeViewModel>(tempArticle); model.AllFields = generatingData.populateFields(); model.AllSubjectCategories = generatingData.populateSubjectCategories(); model.FieldsIds = decodeStringToList(tempArticle.FieldsIds); model.SubjectCategoriesIds = decodeStringToList(tempArticle.SubjectCategoriesIds); return(View(model)); } StepThreeViewModel stepThree = new StepThreeViewModel() { AllFields = generatingData.populateFields(), AllSubjectCategories = generatingData.populateSubjectCategories() }; return(View(stepThree)); }
public async Task OnGetAsync(string returnUrl = null) { ReturnUrl = returnUrl; ExternalLogins = (await _signInManager.GetExternalAuthenticationSchemesAsync()).ToList(); var fields = generatingData.populateFields(); var institutions = generatingData.populateInstitutions(); Input = new InputModel() { AllInstitutions = institutions, AllFields = fields }; }