コード例 #1
0
 public async Task<HttpResponseMessage> Create([FromBody] MatchDto userAccount)
 {
     var request = new CreateMatchRequest
     {
         Match = userAccount
     };
     await _mediator.ExecuteAsync(request).ConfigureAwait(false);
     return Request.CreateResponse(HttpStatusCode.Created);
 }
コード例 #2
0
        public async Task<HttpResponseMessage> CreateMatch([FromBody] PostPutMatchDto match)
        {
            var request = new CreateMatchRequest()
            {
                Match = match
            };

            PostPutMatchDto addedMatch = await _mediator.ExecuteAsync(request).ConfigureAwait(false);
            return Request.CreateResponse(HttpStatusCode.Created, addedMatch);
        }