Пример #1
0
 private Katalog MapKatalogToBusinessKatalog(BusinessServices.Katalog katalog)
 {
     return(new Katalog
     {
         NazwaGry = katalog.NazwaGry,
         OpisGry = katalog.OpisGry
     });
 }
Пример #2
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();
            }
        }