コード例 #1
0
        // PUT api/Judges/5
        public JudgeDto Put([FromBody] JudgeDto judge)
        {
            var updatedJudge = judge.ConvertFromDto();

            JudgeService.Update(updatedJudge);
            return(updatedJudge.ConvertToDto());
        }
コード例 #2
0
        public JudgeDto GetShowContests(int id, [FromBody] JudgeDto judge)
        {
            var contestId = id;
            var newJudge  = judge.ConvertFromDto();

            JudgeService.AddContestJudge(contestId, newJudge);
            return(newJudge.ConvertToDto());
        }
コード例 #3
0
 // DELETE api/Judges/5
 public void Delete([FromBody] JudgeDto judge)
 {
     JudgeService.Delete(judge.ConvertFromDto());
 }
コード例 #4
0
 // POST api/Judges
 public void Post([FromBody] JudgeDto judge)
 {
     JudgeService.Add(judge.ConvertFromDto());
 }