public IHttpActionResult Update(int id, [FromBody] PlaystationUpdateModel game) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _playstationService = new PlaystationService(); _playstationService.UpdatePlaystationGame(id, game); return(Ok()); }
public IHttpActionResult Create([FromBody] PlaystationGameCreateModel model) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _playstationService = new PlaystationService(); _playstationService.CreatePlaystationGame(model); return(Ok()); }
public IHttpActionResult Delete(int id) { _playstationService = new PlaystationService(); _playstationService.DeletePlaystationGame(id); return(Ok()); }
public IHttpActionResult Get(int id) { _playstationService = new PlaystationService(); _playstationService.GetPlaystationGame(id); return(Ok()); }
public IHttpActionResult List() { _playstationService = new PlaystationService(); return(Ok(_playstationService.GetPlaystationGames())); }
public IHttpActionResult Get([FromUri] int id) { _playstationService = new PlaystationService(); return(Ok(_playstationService.GetPlaystationGame(id))); }