public async Task <IActionResult> Put(Guid id, UpdateLeagueCommand command) { if (id != command.Id) { return(BadRequest()); } return(Ok(await Mediator.Send(command))); }
public async Task <IActionResult> Update([FromRoute] uint id, [FromBody] UpdateLeagueCommand cmd) { var isValid = ModelState.IsValid; var league = _leagueService.UpdateLeague(id, cmd); //var result = await _leagueRepo.GetAsync(id); //if (result == null) // return NotFound(); return(Ok()); }
public async Task <IActionResult> Update(int id, UpdateLeagueCommand command) { if (id != command.Id) { return(BadRequest()); } await Mediator.Send(command); return(Ok()); }