Esempio n. 1
0
        public async Task <ActionResult> AddGameImage([FromBody] GameImage gameImage)
        {
            if (gameImage == null)
            {
                return(BadRequest());
            }
            else if (_gameService.GetGame(gameImage.GameId) == null)
            {
                return(NotFound());
            }
            await _gameService.AddGameImageAsync(gameImage);

            await _gameService.SaveChangesAsync();

            return(Ok());
        }