コード例 #1
0
 //Nieuwe pokemon toevoegen aan de playerpokedex
 public static int AddNewPokemonPlayerPokedex(PlayerPokedex entry)
 {
     try
     {
         using (Project_Pokemon_Entities projectPokemonEntities = new Project_Pokemon_Entities())
         {
             projectPokemonEntities.PlayerPokedexes.Add(entry);
             return(projectPokemonEntities.SaveChanges());
         }
     }
     catch (Exception ex)
     {
         FileOperations.FoutLoggen(ex);
         return(0);
     }
 }
コード例 #2
0
 // Updaten van playerpokedex
 public static int UpdatePlayerPokedex(PlayerPokedex playerPokedexEntry)
 {
     try
     {
         using (Project_Pokemon_Entities projectPokemonEntities = new Project_Pokemon_Entities())
         {
             projectPokemonEntities.Entry(playerPokedexEntry).State = EntityState.Modified;
             return(projectPokemonEntities.SaveChanges());
         }
     }
     catch (Exception ex)
     {
         FileOperations.FoutLoggen(ex);
         return(0);
     }
 }