public void LMServiceTest_SendSetupTwice_Success()
        {
            //1. Arrange
            ClearTables();
            ILMService service = new LMService();

            var setup = new SetupContract()
            {
                PlayerName = "Linksonder",
                Top = "Jax",
                Jungle = "Zac",
                Mid = "Katarina",
                Supp = "Sona",
                Adc = "Vayne"
            };

            //2. Act
            int id = service.SendSetup(setup);

            setup.PlayerName = "Rechtsboven";

            id = service.SendSetup(setup);

            //3. Assert
            using (var context = new MyContext())
            {
                var game = context.Games.First();

                Assert.AreEqual(1, context.Games.Count());
                Assert.IsNotNull(game.PlayerOne);
                Assert.IsNotNull(game.PlayerTwo);
                Assert.IsNotNull(game.Winner);
                Assert.AreEqual("Linksonder", game.PlayerOne.PlayerName);
            }
        }
        public int SendSetup(SetupContract setup)
        {
                var setupModel = new Setup()
                {
                    PlayerName = setup.PlayerName,
                    Top = setup.Top,
                    Jungle = setup.Jungle,
                    Mid = setup.Mid,
                    Supp = setup.Supp,
                    Adc = setup.Adc
                };

             using (var context = new MyContext())
             {
                 var game = context.Games.FirstOrDefault(m => m.PlayerTwo == null);

                 if(game != null)
                 {
                     game.PlayerTwo = setupModel;
                     game.Winner = game.PlayerOne;
                     game.TimeStamp = DateTime.Now;
                 }
                 else
                 {
                     game = new Game()
                     {
                         PlayerOne = setupModel,
                         TimeStamp = DateTime.Now,
                     };

                     context.Games.Add(game);
                 }

                context.SaveChanges();
                return game.Id;
            }
        }