Ejemplo n.º 1
0
 public async Task Update(int id, [FromBody] MatchDto match)
 {
     match.Id = id;
     var request = new UpdateMatchRequest
     {
         Match = match
     };
     await _mediator.ExecuteAsync(request).ConfigureAwait(false);
 }
Ejemplo n.º 2
0
        public async Task<HttpResponseMessage> UpdateMatch([FromUri] int id, [FromBody] PostPutMatchDto Match)
        {
            Match.Id = id;
            var request = new UpdateMatchRequest()
            {
                Match = Match
            };

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