// PUT api/ScoreCards/5 public ScoreCardDto Put([FromBody] ScoreCardDto scoreCard) { var updatedScoreCard = scoreCard.ConvertFromDto(); ScoreCardService.Update(updatedScoreCard); return(updatedScoreCard.ConvertToDto()); }
// POST api/ScoreCards public ScoreCardDto Post([FromBody] ScoreCardDto scoreCard) { var newScoreCard = scoreCard.ConvertFromDto(); ScoreCardService.Add(newScoreCard); return(newScoreCard.ConvertToDto()); }
// DELETE api/ScoreCards/5 public void Delete([FromBody] ScoreCardDto scoreCard) { ScoreCardService.Delete(scoreCard.ConvertFromDto()); }