示例#1
0
        public async Task <ActionResult> SelectFactorAsync(SelectFactorViewModel model)
        {
            var selectedFactor = ((List <Factor>)Session["factors"])?.FirstOrDefault(x => x.Type == model.FactorType);

            if (selectedFactor != null && selectedFactor.Type == "sms")
            {
                return(RedirectToAction("EnrollSms", "Manage"));
            }

            throw new NotImplementedException("This flow has not been implemented yet.");
        }
示例#2
0
        // GET: /Manage/SelectFactor
        public ActionResult SelectFactor()
        {
            var factors = ((List <Factor>)Session["factors"])
                          .Select(x => new FactorViewModel {
                Type = x.Type
            }).ToList();
            var viewModel = new SelectFactorViewModel
            {
                Factors    = factors,
                FactorType = factors.FirstOrDefault().Type,
            };

            return(View(viewModel));
        }