Exemple #1
0
        public IActionResult CoachUnassignment(CoachUnAssignmentViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            var response = squadService.UnAssignCoach(model.SquadId.Value, model.CoachId.Value);

            if (!response.RequestIsFulfilled)
            {
                AddModelErrors(response.Errors);
                return(View(model));
            }

            return(RedirectToAction("Index"));
        }