public async Task <IActionResult> Shot([FromBody] ShotRequest request) { AssertExtensions.NotNull(request, nameof(request)); ShotModel model = _applicationMapper.Map(request); ShotResultModel result = await _seeBattleGameService.Shot(model); ShotResponse response = _contractMapper.Map(result); return(new JsonResult(response)); }
public Task <ShotResultModel> Shot(ShotModel shotModel) { ThrowIfHasErrors(_validationService.Validate(shotModel)); return(_service.Shot(shotModel)); }