public async Task <ActionResult> PutUpsertTeamAsync(Guid teamId, [FromBody] UpsertTeamRequest request) { var command = new UpsertTeamCommand(teamId, request.Name); await _upsertTeamCommandHandler.HandleAsync(command); return(Ok()); }
public IActionResult Post([FromBody] UpsertTeamRequest requestParam) { var request = requestParam ?? throw new ArgumentNullException(); var command = new UpsertTeamCommand(this.dapperClient, request); var result = command.Execute(); return(new JsonResult(result)); }