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."))); } }
public void Post([FromBody] AddOrUpdateGameDTO game) { _services.InsertGame(game); }