public IActionResult Details(int id) { DetailsCompoViewModel viewModel = new DetailsCompoViewModel(); viewModel.Compositions = CompoService.GetJoueursForCompoEdit(id); viewModel.PostesPossibles = CompoService.GetPostes(); viewModel.Match = new Data.Models.Match() { Id = id }; return View(viewModel); }
public IActionResult Details(DetailsCompoViewModel viewModel) { CompoService.SaveComposition(viewModel.Match.Id,viewModel.Compositions); return RedirectToAction(nameof(CompositionController.Details), viewModel.Match.Id); }