Exemplo n.º 1
0
        public static void Register()
        {
            Database.SetInitializer(new ContextInitializer());

            // Forces initialization of database on model changes.
            using (var context = new Context())
            {
                context.Database.Initialize(false);
            }
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Initializing database (if needed)...");
            Database.SetInitializer(new ContextInitializer());

            using (var context = new Context())
            {
                context.Database.Initialize(false);
            }

            Console.WriteLine("Starting updater");
            while (true)
                Console.WriteLine(Updater.UpdateFeeds() + " feed(s) updated");
        }