Frequently Used Methods
Frequently Used Methods
Frequently Used Methods
Frequently Used Methods
public ActionResult <GamesReadDto> CreateGame(GamesCreateDto gameCreateDto) { var gameModel = _mapper.Map <Games>(gameCreateDto); _repository.CreateGame(gameModel); _repository.SaveChanges(); var gameReadDto = _mapper.Map <GamesReadDto>(gameModel); return(CreatedAtRoute(nameof(GetGameById), new { Id = gameReadDto.Id }, gameReadDto)); }