Exemple #1
0
        public IHttpActionResult Update(int id, [FromBody] PlaystationUpdateModel game)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            _playstationService = new PlaystationService();

            _playstationService.UpdatePlaystationGame(id, game);

            return(Ok());
        }
Exemple #2
0
        public IHttpActionResult Create([FromBody] PlaystationGameCreateModel model)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            _playstationService = new PlaystationService();

            _playstationService.CreatePlaystationGame(model);

            return(Ok());
        }
Exemple #3
0
 public IHttpActionResult Delete(int id)
 {
     _playstationService = new PlaystationService();
     _playstationService.DeletePlaystationGame(id);
     return(Ok());
 }
Exemple #4
0
 public IHttpActionResult Get(int id)
 {
     _playstationService = new PlaystationService();
     _playstationService.GetPlaystationGame(id);
     return(Ok());
 }
Exemple #5
0
 public IHttpActionResult List()
 {
     _playstationService = new PlaystationService();
     return(Ok(_playstationService.GetPlaystationGames()));
 }
 public IHttpActionResult Get([FromUri] int id)
 {
     _playstationService = new PlaystationService();
     return(Ok(_playstationService.GetPlaystationGame(id)));
 }