Beispiel #1
0
        static void Main()
        {
            int resultCount;

            using (var heroContext = new HeroContext())
            {
                foreach (var hero in heroContext.Heroes)
                {
                    hero.TrainingLevel  = 1;
                    hero.MovesRemaining = 25;
                    hero.Health         = 50;
                }
                resultCount = heroContext.SaveChanges();
            }

#if DEBUG
            Console.WriteLine("{0} heros updated ...", resultCount);
            Console.ReadLine();
#endif
        }
Beispiel #2
0
    static void Main()
    {
      int resultCount;

      using (var heroContext = new HeroContext())
      {
        foreach (var hero in heroContext.Heroes)
        {
          hero.TrainingLevel = 1;
          hero.MovesRemaining = 25;
          hero.Health = 50;
        }
        resultCount = heroContext.SaveChanges();
      }

#if DEBUG

      Console.WriteLine("{0} heros updated ...", resultCount);
      Console.ReadLine();

#endif

    }