Beispiel #1
0
        public void UpdateGame(BusinessServices.Katalog game)
        {
            using (var ctx = new KasynoContext())
            {
                var record = ctx.Katalog.FirstOrDefault(x => x.NazwaGry == game.NazwaGry);

                if (record == null)
                {
                    return;
                }

                record.OpisGry = game.OpisGry;
                ctx.SaveChanges();
            }
        }
Beispiel #2
0
        public void UpdateState(BusinessServices.OpisStanu state)
        {
            using (var ctx = new KasynoContext())
            {
                var record = ctx.OpisStanu.FirstOrDefault(x => x.Id == state.Id);

                if (record == null)
                {
                    return;
                }

                record.IloscGier = state.IloscGier;
                record.Stol      = (ICollection <Stol>)state.NumerStolow;
                ctx.SaveChanges();
            }
        }