//[Authorize(Policy = "CREATE_STUDENT")] public async Task <IActionResult> CreateForm(FormViewModel model) { if (ModelState.IsValid) { var result = await _formRepo.CreateFormAsync(model); if (result > 0) { return(RedirectToAction(nameof(ViewStudents))); } } // Need to repopulate the Roles dropdown. //var roles = await _roleRepo.GetIdentityRolesAsync(); //model.Roles = roles.ToList(); return(View(model)); }