public DisplayScoreResponse DisplayScore(DisplayScoreRequest request) { var player = _playerRepository.Get(request.PlayerId); return new DisplayScoreResponse { Score = player.CalculateScore() }; }
public JsonResult DisplayScore(DisplayScoreRequest request) { try { var response = _colorService.DisplayScore(request); var model = _colorModelFactory.CreateDisplayScoreModel(response); return JsonResult.CreateSuccess(model); } catch (Exception ex) { return JsonResult.CreateFailure(ex.Message, ex); } }