Beispiel #1
0
        public async Task <ActionResult> UpdateTeam([FromRoute] Guid id, EditTeamCommand command)
        {
            if (id == Guid.Empty || id != command.Id)
            {
                return(BadRequest());
            }

            await Mediator.Send(command);

            return(NoContent());
        }
Beispiel #2
0
        public ActionResult Edit(EditTeamCommand command)
        {
            if (ModelState.IsValid)
            {
                logger.InfoFormat("Edit Save {0}", command.ID);

                _editTeamCommand.Handle(command);
                return(RedirectToAction("Index"));
            }

            var model = GetEditData(command.ID);

            model.Command = command;

            return(View(model));
        }