Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            //var migrator = new DbMigrator(new ConsoleLogger());
            var migrator = new DbMigrator(new FileLogger("test.txt"));

            migrator.Migrate();
        }
Ejemplo n.º 2
0
        public static void Main(string[] args)
        {
            // Using the Console Logger
            var dbMigrator = new DbMigrator(new ConsoleLogger());

            dbMigrator.Migrate();

            var dbMigrator2 = new DbMigrator(new FileLogger("/tmp/log.txt"));

            dbMigrator2.Migrate();
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            // Console.WriteLine("Hello World!");
            // Extensibility
            // Instead of changin the code in the existing classes, simply add in new classes that change the behvaior of the system
            // Everytime we want to change the behavior of our software we create new classes
            // We can write automated or unit tests for only our new classes
            // Minimal or 0 impact on current classes
            // Costly though, not every change should be made like this


            // You can do this by an interface


            // INSTANCE OF DBMIRGRATOR
            var dbMigrator = new DbMigrator(new ConsoleLogger());

            // OR CAN DO NEW FILE LOGGER
            // var dbMigrator = new DbMigrator(new FileLogger());
            dbMigrator.Migrate();
        }
Ejemplo n.º 4
0
        static void Main(string [] args)
        {
            DbMigrator dbMigrator = new DbMigrator(new FileLogger("C:\\Projects\\log.txt"));

            dbMigrator.Migrate();
        }