public GamePlatform Add(GamePlatform gamePlatform)
        {
            context.GamePlatforms.Add(gamePlatform);
            context.SaveChanges();

            return gamePlatform;
        }
        public void Add()
        {
            var steam = new GamePlatform { Name = "Steam", Url = "http://store.steampowered.com" };

            var currentCount = context.GamePlatforms.Count();

            var addedGamePlatform = gamePlatformRepository.Add(steam);

            Assert.Equal(currentCount + 1, context.GamePlatforms.Count());
            var foundGamePlatform = context.GamePlatforms.FirstOrDefault(x => x.Id == addedGamePlatform.Id);
            Assert.Equal(steam.Name, foundGamePlatform.Name);
            Assert.Equal(steam.Url, foundGamePlatform.Url);
        }
 public void Update(GamePlatform gamePlatform)
 {
     context.GamePlatforms.Update(gamePlatform);
     context.SaveChanges();
 }
 public void Remove(GamePlatform gamePlatform)
 {
     context.Remove(gamePlatform);
     context.SaveChanges();
 }