Exemplo n.º 1
0
 // OwnedPokemonAttacks toevoegen
 public static int AddCaughtPokemonAttacks(OwnedPokemonAttack ownedPokemonAttack)
 {
     try
     {
         using (Project_Pokemon_Entities projectPokemonEntities = new Project_Pokemon_Entities())
         {
             projectPokemonEntities.OwnedPokemonAttacks.Add(ownedPokemonAttack);
             return(projectPokemonEntities.SaveChanges());
         }
     }
     catch (Exception ex)
     {
         FileOperations.FoutLoggen(ex);
         return(0);
     }
 }
Exemplo n.º 2
0
 // Updaten welke aanvallen de pokemon momenteel kent.
 public static int UpdateKnownAttacks(OwnedPokemonAttack knownAttack)
 {
     try
     {
         using (Project_Pokemon_Entities projectPokemonEntities = new Project_Pokemon_Entities())
         {
             projectPokemonEntities.Entry(knownAttack).State = EntityState.Modified;
             return(projectPokemonEntities.SaveChanges());
         }
     }
     catch (Exception ex)
     {
         FileOperations.FoutLoggen(ex);
         return(0);
     }
 }