public async Task <IActionResult> CreateMatchWithInvites([FromBody] CreateMatchDTO match) { _Logger.LogInformation($"Matches: {HelperMethods.GetCallerMemberName()}"); if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var record = await _MatchManager.CreateMatchWithInvites(match); if (record != null) { return(CreatedAtRoute("GetMatchById", new { id = record }, match)); } return(BadRequest("Save failed")); }
public async Task <Guid?> Handle(CreateMatchWithInvitesCommand request, CancellationToken cancellationToken) { var result = await _MatchManager.CreateMatchWithInvites(request.Match); return(result); }