public async Task <IActionResult> Index(int id) { var group = await this.groupService.GetByIdAsync <GroupViewModel>(id); var model = new GroupIndexComplexModel() { ViewModel = group, }; return(this.View(model)); }
public async Task <IActionResult> Edit(GroupIndexComplexModel model, int id) { var result = await this.groupService.UpdateGroup(model.InputModel, id, this.userManger.GetUserId(this.User)); return(this.RedirectToAction(nameof(this.Index), new { id })); }