public void Post([FromBody] Review review) { _db.Reviews.Add(review); Game foundGame = _db.Games.FirstOrDefault(game => game.GameId == review.GameId); foundGame.Reviews.Add(review); _db.SaveChanges(); }
public void Post([FromBody] Game game) { _db.Games.Add(game); _db.SaveChanges(); }