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