private void SetPlatforms(IGameDTO game, Game gameToDataBase) { gameToDataBase.PlatformTypes = new List <PlatformType>(); foreach (var items in game.PlatformTypes) { gameToDataBase.PlatformTypes.Add(_unitOfWork.PlatformTypeRepository.FindById(items.Id)); } }
private void SetGenres(IGameDTO game, Game gameToDataBase) { gameToDataBase.Genres = new List <Genre>(); foreach (var items in game.Genres) { gameToDataBase.Genres.Add(_unitOfWork.GenreRepository.FindById(items.Id)); } }