// PUT api/Performers/5 public PerformerDto Put([FromBody] PerformerDto performer) { var updatedPerformer = performer.ConvertFromDto(); PerformerService.Update(updatedPerformer); return(updatedPerformer.ConvertToDto()); }
// POST api/Performers public PerformerDto Post([FromBody] PerformerDto performer) { var newPerformer = performer.ConvertFromDto(); PerformerService.Add(newPerformer); return(newPerformer.ConvertToDto()); }
public PerformerDto GetShowContests(int id, [FromBody] PerformerDto performer) { var contestantId = id; var newPerformer = performer.ConvertFromDto(); PerformerService.AddContestantPerformer(contestantId, newPerformer); return(newPerformer.ConvertToDto()); }
// DELETE api/Performers/5 public void Delete([FromBody] PerformerDto performer) { PerformerService.Delete(performer.ConvertFromDto()); }