public async Task <IActionResult> Create([Bind("id,Name,GroupId")] GroupMember groupMember) { if (ModelState.IsValid) { await _groupMember.CreateGroupMember(groupMember); return(RedirectToAction("Create", "AppUserGroupMembers", new { groupMemberId = groupMember.id })); } ViewData["GroupId"] = new SelectList(_context.Groups, "id", "Name", groupMember.GroupId); return(View(groupMember)); }