Ejemplo n.º 1
0
        public async Task <IActionResult> Create(Assignment assignment)
        {
            if (ModelState.IsValid &&
                await AssignmentService.CreateAssignmentAsync(ClassroomName, assignment, ModelErrors))
            {
                return(RedirectToAction("Admin"));
            }
            else
            {
                await PopulateDropDownsAsync(assignment);

                return(View("CreateEdit", assignment));
            }
        }