Esempio n. 1
0
        // PUT api/Performers/5
        public PerformerDto Put([FromBody] PerformerDto performer)
        {
            var updatedPerformer = performer.ConvertFromDto();

            PerformerService.Update(updatedPerformer);
            return(updatedPerformer.ConvertToDto());
        }
Esempio n. 2
0
        // POST api/Performers
        public PerformerDto Post([FromBody] PerformerDto performer)
        {
            var newPerformer = performer.ConvertFromDto();

            PerformerService.Add(newPerformer);
            return(newPerformer.ConvertToDto());
        }
Esempio n. 3
0
        public PerformerDto GetShowContests(int id, [FromBody] PerformerDto performer)
        {
            var contestantId = id;
            var newPerformer = performer.ConvertFromDto();

            PerformerService.AddContestantPerformer(contestantId, newPerformer);
            return(newPerformer.ConvertToDto());
        }
Esempio n. 4
0
 // DELETE api/Performers/5
 public void Delete([FromBody] PerformerDto performer)
 {
     PerformerService.Delete(performer.ConvertFromDto());
 }