コード例 #1
0
 public void Add(Tamagotchi entity)
 {
     try
     {
         _context.Tamagotchis.Add(entity);
         _context.SaveChanges();
     }
     catch (DbEntityValidationException e)
     {
         throw e;
     }
 }
コード例 #2
0
 public void Add(HotelRoomType entity)
 {
     try
     {
         _context.HotelRoomTypes.Add(entity);
         _context.SaveChanges();
     }
     catch (DbEntityValidationException e)
     {
         throw e;
     }
 }
コード例 #3
0
 public void Add(PlayerUser entity)
 {
     try
     {
         _context.PlayerUsers.Add(entity);
         _context.SaveChanges();
     }
     catch (DbEntityValidationException e)
     {
         throw e;
     }
 }