Esempio n. 1
0
        // PUT api/ScoreCards/5
        public ScoreCardDto Put([FromBody] ScoreCardDto scoreCard)
        {
            var updatedScoreCard = scoreCard.ConvertFromDto();

            ScoreCardService.Update(updatedScoreCard);
            return(updatedScoreCard.ConvertToDto());
        }
Esempio n. 2
0
        // POST api/ScoreCards
        public ScoreCardDto Post([FromBody] ScoreCardDto scoreCard)
        {
            var newScoreCard = scoreCard.ConvertFromDto();

            ScoreCardService.Add(newScoreCard);
            return(newScoreCard.ConvertToDto());
        }
Esempio n. 3
0
 // DELETE api/ScoreCards/5
 public void Delete([FromBody] ScoreCardDto scoreCard)
 {
     ScoreCardService.Delete(scoreCard.ConvertFromDto());
 }