Exemple #1
0
 public void Add(Tamagotchi tama)
 {
     tama.Alive  = true;
     tama.Health = 100;
     tama.Money  = 100;
     _tamagotchiEntities.Tamagotchi.Add(tama);
     _tamagotchiEntities.SaveChanges();
 }
Exemple #2
0
 public void Save()
 {
     try
     {
         _db.SaveChanges();
     }
     catch (System.Data.Entity.Validation.DbEntityValidationException e)
     {
         var a = e;
     }
 }
Exemple #3
0
 public void Add(Room room)
 {
     _tamagotchiEntities.Room.Add(room);
     _tamagotchiEntities.SaveChanges();
 }
 public void Save()
 {
     _db.SaveChanges();
 }