예제 #1
0
        public async Task <ActionResult> PutUpsertTeamAsync(Guid teamId, [FromBody] UpsertTeamRequest request)
        {
            var command = new UpsertTeamCommand(teamId, request.Name);
            await _upsertTeamCommandHandler.HandleAsync(command);

            return(Ok());
        }
예제 #2
0
        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));
        }