Example #1
0
 // Playerpokemon object toevoegen
 public static int AddPlayerPokemon(PlayerPokemon playerPokemon)
 {
     try
     {
         using (Project_Pokemon_Entities projectPokemonEntities = new Project_Pokemon_Entities())
         {
             projectPokemonEntities.PlayerPokemons.Add(playerPokemon);
             return(projectPokemonEntities.SaveChanges());
         }
     }
     catch (Exception ex)
     {
         FileOperations.FoutLoggen(ex);
         return(0);
     }
 }
Example #2
0
 public static int UpdatePlayerPartyPokemons(PlayerPokemon playerPokemon)
 {
     try
     {
         using (Project_Pokemon_Entities projectPokemonEntities = new Project_Pokemon_Entities())
         {
             projectPokemonEntities.Entry(playerPokemon).State = EntityState.Modified;
             return(projectPokemonEntities.SaveChanges());
         }
     }
     catch (Exception ex)
     {
         FileOperations.FoutLoggen(ex);
         return(0);
     }
 }