public async Task <IActionResult> DeleteAsync(CancellationToken cancellationToken, params long[] ids) { _logger.LogInformation("GameGenre/Delete was requested."); await _gameGenreService.DeleteAsync(ids); return(NoContent()); }
public async Task <IActionResult> DeleteAsync([FromBody] GameGenreResource resource) { var gamegenre = mapper.Map <GameGenreResource, GameGenre>(resource); var result = await gameGenreService.DeleteAsync(gamegenre); if (!result.IsSuccess) { return(BadRequest(result.Message)); } var gameGenreResource = mapper.Map <GameGenre, GameGenreResource>(result.GameGenre); return(Ok(gameGenreResource)); }