예제 #1
0
        public ActionResult Post([FromBody] AddOrUpdateGameDTO game)
        {
            var id = _services.InsertGame(game);

            if (id != null)
            {
                return(new OkObjectResult(new ResultViewModel(id, 200, "Success!")));
            }
            else
            {
                return(new BadRequestObjectResult(new ResultViewModel(500, "Something went wrong! Try again later.")));
            }
        }
예제 #2
0
 public void Post([FromBody] AddOrUpdateGameDTO game)
 {
     _services.InsertGame(game);
 }